| @@ -1,24 +1,41 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * Number range setting. | |
| 4 | + * | |
| 5 | + * @package Formidable | |
| 6 | + * | |
| 7 | + * @var array $field Field data including 'id', 'field_key', 'minnum', 'maxnum', 'step'. | |
| 8 | + */ | |
| 9 | + | |
| 2 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 3 | 11 | die( 'You are not allowed to call this page directly.' ); |
| 4 | 12 | } |
| 5 | 13 | ?> |
| 6 | 14 | <p class="frm8 frm_first frm_form_field frm-number-range"> |
| 7 | - <label for="frm_format_<?php echo esc_attr( $field['field_key'] ); ?>" class="frm_help" title="<?php esc_attr_e( 'Set the number range the field validation should allow. Browsers that support the HTML5 number field require a number range to determine the numbers seen when clicking the arrows next to the field.', 'formidable' ); ?>"> | |
| 15 | + <label for="frm_format_<?php echo esc_attr( $field['field_key'] ); ?>" class="frm_help frm-font-semibold frm-text-grey-600 frm-mb-xs" title="<?php esc_attr_e( 'Set the number range the field validation should allow. Browsers that support the HTML5 number field require a number range to determine the numbers seen when clicking the arrows next to the field.', 'formidable' ); ?>"> | |
| 8 | 16 | <?php esc_html_e( 'Number Range', 'formidable' ); ?> |
| 9 | 17 | </label> |
| 10 | 18 | <span class="frm_grid_container"> |
| 11 | - <span class="frm5 frm_form_field frm-range-min"> | |
| 12 | - <input type="text" name="field_options[minnum_<?php echo absint( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['minnum'] ); ?>" data-changeme="field_<?php echo esc_attr( $field['field_key'] ); ?>" data-changeatt="min" /> | |
| 19 | + <span class="frm6 frm_form_field frm-range-min"> | |
| 20 | + <label for="frm_minnum_<?php echo esc_attr( $field['field_key'] ); ?>"> | |
| 21 | + <?php esc_html_e( 'Min Value', 'formidable' ); ?> | |
| 22 | + </label> | |
| 23 | + <input type="number" id="frm_minnum_<?php echo esc_attr( $field['field_key'] ); ?>" name="field_options[minnum_<?php echo absint( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['minnum'] ); ?>" data-changeme="field_<?php echo esc_attr( $field['field_key'] ); ?>" data-changeatt="min" /> | |
| 13 | 24 | </span> |
| 14 | - <span class="frm5 frm_last frm_form_field"> | |
| 15 | - <input type="text" name="field_options[maxnum_<?php echo absint( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['maxnum'] ); ?>" data-changeme="field_<?php echo esc_attr( $field['field_key'] ); ?>" data-changeatt="max" /> | |
| 25 | + <span class="frm6 frm_last frm_form_field"> | |
| 26 | + <label for="frm_maxnum_<?php echo esc_attr( $field['field_key'] ); ?>"> | |
| 27 | + <?php esc_html_e( 'Max Value', 'formidable' ); ?> | |
| 28 | + </label> | |
| 29 | + <input type="number" id="frm_maxnum_<?php echo esc_attr( $field['field_key'] ); ?>" name="field_options[maxnum_<?php echo absint( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['maxnum'] ); ?>" data-changeme="field_<?php echo esc_attr( $field['field_key'] ); ?>" data-changeatt="max" /> | |
| 16 | 30 | </span> |
| 17 | 31 | </span> |
| 18 | 32 | </p> |
| 19 | -<p class="frm3 frm_last frm_form_field frm-step"> | |
| 33 | +<p class="frm4 frm_last frm_form_field frm-step frm-self-end"> | |
| 20 | 34 | <label for="frm_step_<?php echo esc_attr( $field['field_key'] ); ?>"> |
| 21 | 35 | <?php esc_html_e( 'Step', 'formidable' ); ?> |
| 22 | 36 | </label> |
| 37 | + <?php | |
| 38 | + // Make sure to use type="text" for step because we also support "any" as a value. | |
| 39 | + ?> | |
| 23 | 40 | <input type="text" name="field_options[step_<?php echo absint( $field['id'] ); ?>]" value="<?php echo esc_attr( $field['step'] ); ?>" id="frm_step_<?php echo esc_attr( $field['field_key'] ); ?>" /> |
| 24 | 41 | </p> |