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 -12 6.26 → trunk View file →
@@ -222,13 +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 );
226 + if ( FrmAppHelper::is_empty_value( $this->displayed_value, '' ) ) {
227 + return;
228 + }
228 229
229 - $this->displayed_value = $field_obj->get_display_value( $this->displayed_value, $atts );
230 - }
230 + $field_obj = FrmFieldFactory::get_field_object( $this->field );
231 + $this->displayed_value = $field_obj->get_display_value( $this->displayed_value, $atts );
231 232 }
232 233
233 234 /**
234 235 * Filter the displayed_value property
@@ -268,16 +269,18 @@
268 269 *
269 270 * @return void
270 271 */
271 272 protected function clean_saved_value() {
272 - if ( $this->saved_value !== '' ) {
273 - if ( ! is_array( $this->saved_value ) && ! is_object( $this->saved_value ) ) {
274 - $field_type = FrmField::get_field_type( $this->field );
275 - FrmFieldsHelper::prepare_field_value( $this->saved_value, $field_type );
276 - }
273 + if ( $this->saved_value === '' ) {
274 + return;
275 + }
277 276
278 - if ( is_array( $this->saved_value ) && empty( $this->saved_value ) ) {
279 - $this->saved_value = '';
280 - }
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 = '';
281 284 }
282 285 }
283 286 }