PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.5
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.5
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 / models / fields / FrmFieldPhone.php

FrmFieldPhone.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.5, at classes/models/fields/FrmFieldPhone.php

63 lines 993 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 /**
7 * @since 3.0
8 */
9 class FrmFieldPhone extends FrmFieldType {
10
11 /**
12 * @var string
13 * @since 3.0
14 */
15 protected $type = 'phone';
16
17 /**
18 * @var string
19 */
20 protected $display_type = 'text';
21
22 /**
23 * @var bool
24 * @since 3.0
25 */
26 protected $holds_email_values = true;
27
28 /**
29 * @var bool
30 */
31 protected $array_allowed = false;
32
33 /**
34 * @return bool[]
35 */
36 protected function field_settings_for_type() {
37 return array(
38 'size' => true,
39 'clear_on_focus' => true,
40 'invalid' => true,
41 'format' => true,
42 );
43 }
44
45 /**
46 * @return string
47 */
48 protected function html5_input_type() {
49 $frm_settings = FrmAppHelper::get_settings();
50
51 return $frm_settings->use_html ? 'tel' : 'text';
52 }
53
54 /**
55 * @since 4.0.04
56 *
57 * @return void
58 */
59 public function sanitize_value( &$value ) {
60 FrmAppHelper::sanitize_value( 'sanitize_text_field', $value );
61 }
62 }
63