PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.2.04
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.2.04
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/FrmFieldFormHtml.php +5 -8 6.45.2.04 View file →
@@ -230,9 +230,9 @@
230 230 private function replace_error_shortcode() {
231 231 $this->maybe_add_error_id();
232 232 $error = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? $this->pass_args['errors'][ 'field' . $this->field_id ] : false;
233 233
234 - if ( ! empty( $error ) && false === strpos( $this->html, 'role="alert"' ) && FrmAppHelper::should_include_alert_role_on_field_errors() ) {
234 + if ( ! empty( $error ) && false === strpos( $this->html, 'role="alert"' ) ) {
235 235 $error_body = self::get_error_body( $this->html );
236 236 if ( is_string( $error_body ) && false === strpos( $error_body, 'role=' ) ) {
237 237 $new_error_body = preg_replace( '/class="frm_error/', 'role="alert" class="frm_error', $error_body, 1 );
238 238 $this->html = str_replace( '[if error]' . $error_body . '[/if error]', '[if error]' . $new_error_body . '[/if error]', $this->html );
@@ -408,8 +408,11 @@
408 408 */
409 409 private function add_class_to_label() {
410 410 $label_class = $this->field_obj->get_label_class();
411 411 $this->html = str_replace( '[label_position]', $label_class, $this->html );
412 + if ( $this->field_obj->get_field_column( 'label' ) == 'inside' && $this->field_obj->get_field_column( 'value' ) != '' ) {
413 + $this->html = str_replace( 'frm_primary_label', 'frm_primary_label frm_visible', $this->html );
414 + }
412 415 }
413 416
414 417 /**
415 418 * Replace [entry_key]
@@ -449,15 +452,9 @@
449 452
450 453 // Add label position class
451 454 $settings = $this->field_obj->display_field_settings();
452 455 if ( isset( $settings['label_position'] ) && $settings['label_position'] ) {
453 - $label_position = $this->field_obj->get_field_column( 'label' );
454 - $classes .= ' frm_' . $label_position . '_container';
455 -
456 - // Add class if field has value, to be used for floating label styling.
457 - if ( 'inside' === $label_position && $this->field_obj->get_field_column( 'value' ) ) {
458 - $classes .= ' frm_label_float_top';
459 - }
456 + $classes .= ' frm_' . $this->field_obj->get_field_column( 'label' ) . '_container';
460 457 }
461 458
462 459 // Add CSS layout classes
463 460 $extra_classes = $this->field_obj->get_field_column( 'classes' );