GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
type_textarea.php
Go to the documentation of this file.
1 <?php
2 /**
3  * textarea input type
4  */
6 
7  function render_option() {
8 
9  ?>
10  <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php
11 
12  echo '<span class="gv-label">'.$this->get_field_label().'</span>';
13  echo $this->get_tooltip() . $this->get_field_desc();
14  ?><div>
15  <?php $this->render_input(); ?>
16  </div>
17  </label>
18  <?php
19  }
20 
21  function render_input( $override_input = null ) {
22  if( isset( $override_input ) ) {
23  echo $override_input;
24  return;
25  }
26 
27  $class = 'widefat ';
28 
29  $show_mt = $this->show_merge_tags();
30 
31  if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
32  $class .= ' merge-tag-support mt-position-right ';
33 
34  if( empty( $this->field['show_all_fields'] ) ) {
35  $class .= ' mt-hide_all_fields ';
36  }
37  }
38  $class .= rgar( $this->field, 'class' );
39  $placeholder = rgar( $this->field, 'placeholder' );
40  ?>
41  <textarea name="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo gravityview_sanitize_html_class( $class ); ?>" rows="5"><?php echo esc_textarea( $this->value ); ?></textarea>
42  <?php
43  }
44 
45 }
show_merge_tags()
Verify if field should have merge tags.
get_field_desc()
Retrieve field description.
$class
Modify option field type by extending this class.
render_input($override_input=null)