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 / format-dropdown-options.php

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

53 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Formidable
4 *
5 * @since 6.18
6 *
7 * @var array $field Field data.
8 * @var array $args Includes 'field', 'display', and 'values' settings.
9 * @var FrmFieldType $this Field type object.
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 die( 'You are not allowed to call this page directly.' );
14 }
15
16 $field_type = $field['type'];
17 $format = FrmField::get_option( $field, 'format' );
18
19 FrmHtmlHelper::echo_dropdown_option( __( 'None', 'formidable' ), '' === $format, array( 'value' => 'none' ) );
20
21 FrmHtmlHelper::echo_dropdown_option(
22 in_array( $field_type, array( 'number', 'range' ), true ) ? __( 'Custom', 'formidable' ) : __( 'Number', 'formidable' ),
23 false,
24 array(
25 'value' => '',
26 'class' => 'frm_show_upgrade frm_noallow',
27 'data-upgrade' => __( 'Format number field', 'formidable' ),
28 'data-medium' => 'format-number-field',
29 )
30 );
31
32 FrmHtmlHelper::echo_dropdown_option(
33 __( 'Currency', 'formidable' ),
34 false,
35 array(
36 'value' => '',
37 'class' => 'frm_show_upgrade frm_noallow',
38 'data-upgrade' => __( 'Format currency field', 'formidable' ),
39 'data-medium' => 'format-currency-field',
40 )
41 );
42
43 if ( 'text' === $field_type ) {
44 FrmHtmlHelper::echo_dropdown_option(
45 __( 'Custom', 'formidable' ),
46 $format && ! FrmCurrencyHelper::is_currency_format( $format ),
47 array(
48 'value' => 'custom',
49 'data-dependency' => '#frm-field-format-custom-' . $field_id,
50 )
51 );
52 }
53