| @@ -14,13 +14,8 @@ | ||
| 14 | 14 | */ |
| 15 | 15 | protected $type = 'phone'; |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @var string | |
| 19 | - */ | |
| 20 | - protected $display_type = 'text'; | |
| 21 | - | |
| 22 | - /** | |
| 23 | 18 | * @var bool |
| 24 | 19 | * @since 3.0 |
| 25 | 20 | */ |
| 26 | 21 | protected $holds_email_values = true; |
| @@ -37,19 +32,53 @@ | ||
| 37 | 32 | return array( |
| 38 | 33 | 'size' => true, |
| 39 | 34 | 'clear_on_focus' => true, |
| 40 | 35 | 'invalid' => true, |
| 41 | - 'format' => true, | |
| 42 | 36 | ); |
| 43 | 37 | } |
| 44 | 38 | |
| 45 | 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']; | |
| 48 | + | |
| 49 | + include FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/phone/phone-type.php'; | |
| 50 | + FrmFieldsController::show_format_option( $field ); | |
| 51 | + | |
| 52 | + parent::show_primary_options( $args ); | |
| 53 | + } | |
| 54 | + | |
| 55 | + /** | |
| 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="international" | |
| 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 | + <?php selected( FrmField::get_option( $this->field, 'format' ), 'international' ); ?> | |
| 70 | + > | |
| 71 | + <?php esc_html_e( 'International', 'formidable' ); ?> | |
| 72 | + </option> | |
| 73 | + <?php | |
| 74 | + } | |
| 75 | + | |
| 76 | + /** | |
| 46 | 77 | * @return string |
| 47 | 78 | */ |
| 48 | 79 | protected function html5_input_type() { |
| 49 | - $frm_settings = FrmAppHelper::get_settings(); | |
| 50 | - | |
| 51 | - return $frm_settings->use_html ? 'tel' : 'text'; | |
| 80 | + return 'tel'; | |
| 52 | 81 | } |
| 53 | 82 | |
| 54 | 83 | /** |
| 55 | 84 | * @since 4.0.04 |