| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
$field_size_container_atts = array(); |
| 7 |
if ( $display_max ) { |
| 8 |
$max_characters_label = __( 'Max Characters', 'formidable' ); |
| 9 |
$can_fit_label_in_two_columns = FrmAppHelper::mb_function( array( 'mb_strlen', 'strlen' ), array( $max_characters_label ) ) < 20; |
| 10 |
|
| 11 |
if ( $can_fit_label_in_two_columns ) { |
| 12 |
$field_size_container_atts['class'] = 'frm6 frm_form_field'; |
| 13 |
} |
| 14 |
} |
| 15 |
?> |
| 16 |
<p <?php FrmAppHelper::array_to_html_params( $field_size_container_atts, true ); ?>> |
| 17 |
<label for="field_options_size_<?php echo esc_attr( $field['id'] ); ?>"> |
| 18 |
<?php esc_html_e( 'Field Size', 'formidable' ); ?> |
| 19 |
<span class="frm-sub-label"> |
| 20 |
<?php esc_html_e( '(%, px, em)', 'formidable' ); ?> |
| 21 |
</span> |
| 22 |
</label> |
| 23 |
|
| 24 |
<input type="text" name="field_options[size_<?php echo esc_attr( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['size'] ); ?>" size="5" id="field_options_size_<?php echo esc_attr( $field['id'] ); ?>" aria-describedby="howto_size_<?php echo esc_attr( $field['id'] ); ?>" /> |
| 25 |
</p> |
| 26 |
|
| 27 |
<?php |
| 28 |
if ( $display_max ) { |
| 29 |
include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/max.php'; |
| 30 |
} |
| 31 |
?> |
| 32 |
|