GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
type_text.php
Go to the documentation of this file.
1 <?php
2 /**
3  * text input type
4  */
6 
7  function render_option() {
8  ?>
9  <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php
10 
11  echo '<span class="gv-label">'.$this->get_field_label().'</span>';
12  echo $this->get_tooltip() . $this->get_field_desc();
13  ?><div>
14  <?php $this->render_input(); ?>
15  </div>
16  </label>
17  <?php
18  }
19 
20  function render_input( $override_input = null ) {
21 
22  if( isset( $override_input ) ) {
23  echo $override_input;
24  return;
25  }
26 
27  $class = '';
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 = 'gv-merge-tag-support mt-position-right mt-hide_all_fields ';
33  }
34  $class .= \GV\Utils::get( $this->field, 'class', 'widefat' );
35  $placeholder = \GV\Utils::get( $this->field, 'placeholder' );
36  ?>
37  <input name="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>">
38  <?php
39  }
40 
41 }
42 
43 
44 
show_merge_tags()
Verify if field should have merge tags.
get_field_desc()
Retrieve field description.
$class
text input type
Definition: type_text.php:5
Modify option field type by extending this class.
static get( $array, $key, $default=null)
Grab a value from an array or an object or default.
render_input( $override_input=null)
Definition: type_text.php:20