GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
type_select.php
Go to the documentation of this file.
1 <?php
2 /**
3  * select
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 
13  echo $this->get_tooltip() . $this->get_field_desc();
14 
15  $this->render_input();
16 
17  ?>
18  </label>
19  <?php
20  }
21 
22  function render_input( $override_input = null ) {
23  if( isset( $override_input ) ) {
24  echo $override_input;
25  return;
26  }
27  ?>
28  <select name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>">
29  <?php foreach( $this->field['options'] as $value => $label ) : ?>
30  <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $this->value, true ); ?>><?php echo esc_html( $label ); ?></option>
31  <?php endforeach; ?>
32  </select>
33  <?php
34  }
35 }
36 
get_field_desc()
Retrieve field description.
Modify option field type by extending this class.
render_input( $override_input=null)
Definition: type_select.php:22