GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
field-chainedselect-html.php
Go to the documentation of this file.
1 <?php
2 /**
3  * The default Chained Select field output template.
4  *
5  * @global \GV\Template_Context $gravityview
6  * @since 2.0
7  */
8 
9 if ( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
10  gravityview()->log->error( '{file} template loaded without context', array( 'file' => __FILE__ ) );
11  return;
12 }
13 
14 $field_value = gravityview_get_field_value( $gravityview->entry->as_entry(), $gravityview->field->ID, $gravityview->display_value );
15 
16 // The Chained Selects add-on is not active. This is a rudimentary fallback.
17 if ( is_array( $field_value ) ) {
18  echo implode( '; ', $field_value );
19 } else {
20  echo $field_value;
21 }
gravityview_get_field_value( $entry, $field_id, $display_value)
Handle getting values for complex Gravity Forms fields.
Definition: class-api.php:1034
if(! isset( $gravityview)||empty( $gravityview->template)) $field_value
The default Chained Select field output template.
gravityview()
The main GravityView wrapper function.