GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
class-gravityview-field-textarea.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @file class-gravityview-field-textarea.php
4  * @package GravityView
5  * @subpackage includes\fields
6  */
7 
8 /**
9  * Add custom options for textarea fields
10  */
12 
13  var $name = 'textarea';
14 
15  var $search_operators = array( 'is', 'isnot', 'contains', 'starts_with', 'ends_with' );
16 
17  var $_gf_field_class_name = 'GF_Field_Textarea';
18 
19  var $group = 'standard';
20 
21  public function __construct() {
22  $this->label = esc_html__( 'Paragraph Text', 'gravityview' );
23  parent::__construct();
24  }
25 
26  function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) {
27 
28  if( 'edit' === $context ) {
29  return $field_options;
30  }
31 
32  $field_options['trim_words'] = array(
33  'type' => 'number',
34  'merge_tags' => false,
35  'value' => null,
36  'label' => __( 'Maximum words shown', 'gravityview' ),
37  'tooltip' => __( 'Enter the number of words to be shown. If specified it truncates the text. Leave it blank if you want to show the full text.', 'gravityview' ),
38  );
39 
40  $field_options['make_clickable'] = array(
41  'type' => 'checkbox',
42  'merge_tags' => false,
43  'value' => 0,
44  'label' => __( 'Convert text URLs to HTML links', 'gravityview' ),
45  'tooltip' => __( 'Converts URI, www, FTP, and email addresses in HTML links', 'gravityview' ),
46  );
47 
48  return $field_options;
49  }
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 custom options for textarea fields.