PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.8
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.8
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
← All changes | classes/models/fields/FrmFieldPhone.php +9 -43 6.356.8 View file →
@@ -9,16 +9,19 @@
9 9 class FrmFieldPhone extends FrmFieldType {
10 10
11 11 /**
12 12 * @var string
13 - *
14 13 * @since 3.0
15 14 */
16 15 protected $type = 'phone';
17 16
18 17 /**
18 + * @var string
19 + */
20 + protected $display_type = 'text';
21 +
22 + /**
19 23 * @var bool
20 - *
21 24 * @since 3.0
22 25 */
23 26 protected $holds_email_values = true;
24 27
@@ -34,60 +37,23 @@
34 37 return array(
35 38 'size' => true,
36 39 'clear_on_focus' => true,
37 40 'invalid' => true,
41 + 'format' => true,
38 42 );
39 43 }
40 44
41 45 /**
42 - * @since 6.9
43 - *
44 - * @param array $args Includes 'field', 'display', and 'values'.
45 - *
46 - * @return void
47 - */
48 - public function show_primary_options( $args ) {
49 - $field = $args['field'];
50 -
51 - include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/phone/phone-type.php';
52 - FrmFieldsController::show_format_option( $field, true );
53 -
54 - parent::show_primary_options( $args );
55 - }
56 -
57 - /**
58 - * Retrieves the HTML for an 'International' option in a dropdown.
59 - *
60 - * @since 6.9
61 - *
62 - * @return void Outputs the HTML option tag directly.
63 - */
64 - protected function print_international_option() {
65 - // phpcs:disable Generic.WhiteSpace.ScopeIndent
66 - ?>
67 - <option
68 - value=""
69 - class="frm_show_upgrade frm_noallow"
70 - data-upgrade="<?php esc_attr_e( 'International phone field', 'formidable' ); ?>"
71 - data-medium="international-phone-field"
72 - >
73 - <?php esc_html_e( 'International', 'formidable' ); ?>
74 - </option>
75 - <?php
76 - // phpcs:enable Generic.WhiteSpace.ScopeIndent
77 - }
78 -
79 - /**
80 46 * @return string
81 47 */
82 48 protected function html5_input_type() {
83 - return 'tel';
49 + $frm_settings = FrmAppHelper::get_settings();
50 +
51 + return $frm_settings->use_html ? 'tel' : 'text';
84 52 }
85 53
86 54 /**
87 55 * @since 4.0.04
88 - *
89 - * @param array|string $value
90 56 *
91 57 * @return void
92 58 */
93 59 public function sanitize_value( &$value ) {