Showing the label of a Drop Down or Radio Buttons choice in a View
When Show Values is turned on for a Drop Down or Radio Buttons field in Gravity Forms, each choice has a label that people see on the form and a value that is saved with the entry, such as Cardiff Judo Club and cardiff. GravityView shows the value unless you tell it to show the label.
Show the label for one field #
- Edit the View and click the gear icon on the field.
- Under What should be displayed, choose Label of the input.
- Click Close, then Update.

The setting appears only for fields whose choices have separate values. It applies to the field where you set it, so set it again if the same field is also in another layout, such as the Single Entry Layout.
Show labels for Drop Down fields with code #
The gravityview/fields/select/output_label filter shows labels for Drop Down fields without changing each field’s setting. It doesn’t change Radio Buttons fields, which use the setting only.
To show labels for Drop Down fields in every View:
// Show the label of Drop Down choices in every View.
add_filter( 'gravityview/fields/select/output_label', '__return_true' );To show labels only in Views of one form, change 7 to your form’s ID:
/**
* Shows the label of Drop Down choices in Views of one form.
*
* @param bool $show_label Whether to show the label of the choice.
* @param array $entry The entry being displayed.
*
* @return bool True to show the label.
*/
add_filter( 'gravityview/fields/select/output_label', function ( $show_label, $entry ) {
$form_id = 7; // Change to your form's ID.
if ( isset( $entry['form_id'] ) && (int) $entry['form_id'] === $form_id ) {
return true;
}
return $show_label;
}, 10, 2 );To show labels only in one View, change 50 to your View’s ID:
/**
* Shows the label of Drop Down choices in one View.
*
* @param bool $show_label Whether to show the label of the choice.
*
* @return bool True to show the label.
*/
add_filter( 'gravityview/fields/select/output_label', function ( $show_label ) {
$view_id = 50; // Change to your View's ID.
if ( function_exists( 'gravityview_get_view_id' ) && (int) gravityview_get_view_id() === $view_id ) {
return true;
}
return $show_label;
} );Note: To add this code to your site, see Adding custom PHP code snippets to your website.
Choices added when the form displays #
The label comes from the choices saved in the form. If code adds a field’s choices only when the form displays, with a filter such as gform_pre_render, the View has no label to show. It shows the saved value, even with Label of the input selected or the filter above in place.
To show labels for such a field, match each saved value to its label. Change 3 to your field’s ID, and use gravityview/template/field/radio/output for a Radio Buttons field:
/**
* Shows labels for a Drop Down field whose choices are added when the form displays.
*
* @param string $output The field's output.
* @param \GV\Template_Context $context The template context.
*
* @return string The label, or the original output for any other field or value.
*/
add_filter( 'gravityview/template/field/select/output', function ( $output, $context ) {
// Change 3 to your field's ID.
if ( 3 !== (int) $context->field->ID ) {
return $output;
}
// One line per choice: 'saved value' => 'label'.
$labels = array(
'cardiff' => 'Cardiff Judo Club',
'bristol' => 'Bristol Judo Club',
);
return isset( $labels[ $context->value ] ) ? $labels[ $context->value ] : $output;
}, 10, 2 );Note: To add this code to your site, see Adding custom PHP code snippets to your website.
Choices you delete from the form #
The label belongs to the choice in the form. If you delete a choice, entries that saved it show its value even when the View is set to show labels. Changing or deleting choices in a form that already has entries explains what else changes and how to retire a choice without deleting it.