| @@ -1,10 +1,25 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * Max characters / rows setting in field settings. | |
| 4 | + * | |
| 5 | + * @package Formidable | |
| 6 | + * | |
| 7 | + * @var array $field Field data including 'id', 'type', 'max'. | |
| 8 | + * @var bool $can_fit_label_in_two_columns Whether the label is short enough for a two-column layout. | |
| 9 | + */ | |
| 10 | + | |
| 2 | 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 12 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 13 | } |
| 14 | + | |
| 15 | +$max_setting_container_atts = array(); | |
| 16 | + | |
| 17 | +if ( ! empty( $can_fit_label_in_two_columns ) ) { | |
| 18 | + $max_setting_container_atts['class'] = 'frm6 frm_form_field'; | |
| 19 | +} | |
| 5 | 20 | ?> |
| 6 | -<p class="frm6 frm_form_field"> | |
| 21 | +<p <?php FrmAppHelper::array_to_html_params( $max_setting_container_atts, true ); ?>> | |
| 7 | 22 | <label for="field_options_max_<?php echo esc_attr( $field['id'] ); ?>"> |
| 8 | 23 | <?php |
| 9 | 24 | if ( 'textarea' === $field['type'] || 'rte' === $field['type'] ) { |
| 10 | 25 | esc_html_e( 'Rows', 'formidable' ); |