| @@ -9,8 +9,9 @@ | ||
| 9 | 9 | class FrmFieldTextarea extends FrmFieldType { |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * @var string |
| 13 | + * | |
| 13 | 14 | * @since 3.0 |
| 14 | 15 | */ |
| 15 | 16 | protected $type = 'textarea'; |
| 16 | 17 | |
| @@ -60,8 +61,9 @@ | ||
| 60 | 61 | if ( $size ) { |
| 61 | 62 | if ( is_numeric( $size ) ) { |
| 62 | 63 | $size .= 'px'; |
| 63 | 64 | } |
| 65 | + | |
| 64 | 66 | $style = 'width:' . $size . ';'; |
| 65 | 67 | echo ' style="' . esc_attr( $style ) . '"'; |
| 66 | 68 | } |
| 67 | 69 | |
| @@ -71,9 +73,8 @@ | ||
| 71 | 73 | } |
| 72 | 74 | |
| 73 | 75 | protected function prepare_display_value( $value, $atts ) { |
| 74 | 76 | FrmFieldsHelper::run_wpautop( $atts, $value ); |
| 75 | - | |
| 76 | 77 | return $value; |
| 77 | 78 | } |
| 78 | 79 | |
| 79 | 80 | /** |
| @@ -96,13 +97,14 @@ | ||
| 96 | 97 | * @return string |
| 97 | 98 | */ |
| 98 | 99 | public function front_field_input( $args, $shortcode_atts ) { |
| 99 | 100 | $input_html = $this->get_field_input_html_hook( $this->field ); |
| 100 | - $this->add_aria_description( $args, $input_html ); | |
| 101 | - $rows = $this->field['max'] ? 'rows="' . esc_attr( $this->field['max'] ) . '" ' : ''; | |
| 101 | + $rows = $this->field['max'] ? 'rows="' . esc_attr( $this->field['max'] ) . '" ' : ''; | |
| 102 | 102 | |
| 103 | + // phpcs:disable Generic.WhiteSpace.ScopeIndent | |
| 103 | 104 | return '<textarea name="' . esc_attr( $args['field_name'] ) . '" id="' . esc_attr( $args['html_id'] ) . '" ' . |
| 104 | 105 | $rows . $input_html . '>' . |
| 105 | 106 | FrmAppHelper::esc_textarea( $this->field['value'] ) . |
| 106 | 107 | '</textarea>'; |
| 108 | + // phpcs:enable Generic.WhiteSpace.ScopeIndent | |
| 107 | 109 | } |
| 108 | 110 | } |