PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.7
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.7
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/fields/FrmFieldTextarea.php +4 -14 6.356.7 View file →
@@ -9,9 +9,8 @@
9 9 class FrmFieldTextarea extends FrmFieldType {
10 10
11 11 /**
12 12 * @var string
13 - *
14 13 * @since 3.0
15 14 */
16 15 protected $type = 'textarea';
17 16
@@ -47,23 +46,14 @@
47 46 public function show_on_form_builder( $name = '' ) {
48 47 $size = FrmField::get_option( $this->field, 'size' );
49 48 $max = FrmField::get_option( $this->field, 'max' );
50 49
51 - $html_atts = array(
52 - 'name' => $this->html_name( $name ),
53 - 'id' => $this->html_id(),
54 - 'rows' => $max,
55 - 'class' => 'dyn_default_value',
56 - 'placeholder' => FrmField::get_option( $this->field, 'placeholder' ),
57 - );
58 - echo '<textarea';
59 - FrmAppHelper::array_to_html_params( $html_atts, true );
50 + echo '<textarea name="' . esc_attr( $this->html_name( $name ) ) . '" rows="' . esc_attr( $max ) . '" id="' . esc_attr( $this->html_id() ) . '" class="dyn_default_value"';
60 51
61 52 if ( $size ) {
62 53 if ( is_numeric( $size ) ) {
63 54 $size .= 'px';
64 55 }
65 -
66 56 $style = 'width:' . $size . ';';
67 57 echo ' style="' . esc_attr( $style ) . '"';
68 58 }
69 59
@@ -73,8 +63,9 @@
73 63 }
74 64
75 65 protected function prepare_display_value( $value, $atts ) {
76 66 FrmFieldsHelper::run_wpautop( $atts, $value );
67 +
77 68 return $value;
78 69 }
79 70
80 71 /**
@@ -97,14 +88,13 @@
97 88 * @return string
98 89 */
99 90 public function front_field_input( $args, $shortcode_atts ) {
100 91 $input_html = $this->get_field_input_html_hook( $this->field );
101 - $rows = $this->field['max'] ? 'rows="' . esc_attr( $this->field['max'] ) . '" ' : '';
92 + $this->add_aria_description( $args, $input_html );
93 + $rows = ( $this->field['max'] ) ? 'rows="' . esc_attr( $this->field['max'] ) . '" ' : '';
102 94
103 - // phpcs:disable Generic.WhiteSpace.ScopeIndent
104 95 return '<textarea name="' . esc_attr( $args['field_name'] ) . '" id="' . esc_attr( $args['html_id'] ) . '" ' .
105 96 $rows . $input_html . '>' .
106 97 FrmAppHelper::esc_textarea( $this->field['value'] ) .
107 98 '</textarea>';
108 - // phpcs:enable Generic.WhiteSpace.ScopeIndent
109 99 }
110 100 }