PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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
formidable / classes / views / frm-fields / back-end / pixels-wide.php

pixels-wide.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More trunk, at classes/views/frm-fields/back-end/pixels-wide.php

49 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Field size (pixels wide) setting in field settings.
4 *
5 * @package Formidable
6 *
7 * @var array $field Field data including 'id' and 'size'.
8 * @var bool $display_max Whether to include the Max Characters input.
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 die( 'You are not allowed to call this page directly.' );
13 }
14
15 $field_size_container_atts = array();
16
17 if ( $display_max ) {
18 $max_characters_label = __( 'Max Characters', 'formidable' );
19 $can_fit_label_in_two_columns = FrmAppHelper::mb_function( array( 'mb_strlen', 'strlen' ), array( $max_characters_label ) ) < 20;
20
21 if ( $can_fit_label_in_two_columns ) {
22 $field_size_container_atts['class'] = 'frm6 frm_form_field';
23 }
24 }
25 ?>
26 <p <?php FrmAppHelper::array_to_html_params( $field_size_container_atts, true ); ?>>
27 <label for="field_options_size_<?php echo esc_attr( $field['id'] ); ?>">
28 <?php esc_html_e( 'Field Size', 'formidable' ); ?>
29 </label>
30
31 <?php
32 FrmHtmlHelper::echo_unit_input(
33 array(
34 'value' => $field['size'],
35 'field_attrs' => array(
36 'id' => 'field_options_size_' . $field['id'],
37 'name' => 'field_options[size_' . $field['id'] . ']',
38 ),
39 )
40 );
41 ?>
42 </p>
43
44 <?php
45 if ( $display_max ) {
46 include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/max.php';
47 }
48 ?>
49