GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
class-gravityview-field-phone.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @file class-gravityview-field-phone.php
4  * @package GravityView
5  * @subpackage includes\fields
6  */
7 
9 
10  var $name = 'phone';
11 
12  var $is_searchable = true;
13 
14  var $_gf_field_class_name = 'GF_Field_Phone';
15 
16  var $group = 'advanced';
17 
18  public function __construct() {
19  $this->label = esc_html__( 'Phone', 'gravityview' );
20  parent::__construct();
21  }
22 
23  /**
24  * Add option to link phone number
25  *
26  * @since 1.17
27  *
28  * @param array $field_options
29  * @param string $template_id
30  * @param string $field_id
31  * @param string $context
32  * @param string $input_type
33  *
34  * @return array
35  */
36  function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
37 
38  if( 'edit' === $context ) {
39  return $field_options;
40  }
41 
42  $field_options['link_phone'] = array(
43  'type' => 'checkbox',
44  'label' => __( 'Make Phone Number Clickable', 'gravityview' ),
45  'desc' => __( 'Allow dialing a number by clicking it?', 'gravityview'),
46  'value' => true,
47  );
48 
49  return $field_options;
50  }
51 }
52 
Modify field settings by extending this class.
$field_id
Definition: time.php:17
field_options($field_options, $template_id, $field_id, $context, $input_type)
Add option to link phone number.