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