GravityView  1.19.4
The best, easiest way to display Gravity Forms entries on your website.
select.php
Go to the documentation of this file.
1 <?php
2 /**
3  * Display the select field type
4  *
5  * @package GravityView
6  * @subpackage GravityView/templates/fields
7  */
8 
10 
11 extract( $gravityview_view->getCurrentField() );
12 
13 /**
14  * @filter `gravityview/fields/select/output_label` Override whether to show the value or the label of a Select field
15  * @since 1.5.2
16  * @param bool $show_label True: Show the label of the Choice; False: show the value of the Choice. Default: `false`
17  * @param array $entry GF Entry
18  * @param GF_Field_Select $field Gravity Forms Select field
19  */
20 $show_label = apply_filters( 'gravityview/fields/select/output_label', ( 'label' === rgar( $field_settings, 'choice_display' ) ), $entry, $field );
21 
22 if( $show_label && !empty( $field->choices ) && is_array( $field->choices ) && '' !== $display_value ) {
23  $output = RGFormsModel::get_choice_text( $field, $display_value );
24 } else {
25  $output = $display_value;
26 }
27 
28 echo $output;
$show_label
Definition: select.php:20
$gravityview_view
Definition: select.php:9
$field_settings['content']
Definition: custom.php:27
static getInstance($passed_post=NULL)
$entry
Definition: notes.php:27
$field
Definition: gquiz_grade.php:11