| 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 |
</label> |
| 20 |
|
| 21 |
<?php |
| 22 |
FrmHtmlHelper::echo_unit_input( |
| 23 |
array( |
| 24 |
'value' => $field['size'], |
| 25 |
'field_attrs' => array( |
| 26 |
'id' => 'field_options_size_' . $field['id'], |
| 27 |
'name' => 'field_options[size_' . $field['id'] . ']', |
| 28 |
), |
| 29 |
) |
| 30 |
); |
| 31 |
?> |
| 32 |
</p> |
| 33 |
|
| 34 |
<?php |
| 35 |
if ( $display_max ) { |
| 36 |
include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/max.php'; |
| 37 |
} |
| 38 |
?> |
| 39 |
|