PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmFieldValue.php +15 -11 6.27 → trunk View file →
@@ -222,12 +222,14 @@
222 222 *
223 223 * @return void
224 224 */
225 225 protected function generate_displayed_value_for_field_type( $atts ) {
226 - if ( ! FrmAppHelper::is_empty_value( $this->displayed_value, '' ) ) {
227 - $field_obj = FrmFieldFactory::get_field_object( $this->field );
228 - $this->displayed_value = $field_obj->get_display_value( $this->displayed_value, $atts );
226 + if ( FrmAppHelper::is_empty_value( $this->displayed_value, '' ) ) {
227 + return;
229 228 }
229 +
230 + $field_obj = FrmFieldFactory::get_field_object( $this->field );
231 + $this->displayed_value = $field_obj->get_display_value( $this->displayed_value, $atts );
230 232 }
231 233
232 234 /**
233 235 * Filter the displayed_value property
@@ -267,16 +269,18 @@
267 269 *
268 270 * @return void
269 271 */
270 272 protected function clean_saved_value() {
271 - if ( $this->saved_value !== '' ) {
272 - if ( ! is_array( $this->saved_value ) && ! is_object( $this->saved_value ) ) {
273 - $field_type = FrmField::get_field_type( $this->field );
274 - FrmFieldsHelper::prepare_field_value( $this->saved_value, $field_type );
275 - }
273 + if ( $this->saved_value === '' ) {
274 + return;
275 + }
276 276
277 - if ( is_array( $this->saved_value ) && empty( $this->saved_value ) ) {
278 - $this->saved_value = '';
279 - }
277 + if ( ! is_array( $this->saved_value ) && ! is_object( $this->saved_value ) ) {
278 + $field_type = FrmField::get_field_type( $this->field );
279 + FrmFieldsHelper::prepare_field_value( $this->saved_value, $field_type );
280 + }
281 +
282 + if ( is_array( $this->saved_value ) && ! $this->saved_value ) {
283 + $this->saved_value = '';
280 284 }
281 285 }
282 286 }