gps_use_choice_text

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Show choice values instead of labels
  5. Since

Description

Filters whether choice labels are displayed instead of values in the Entry List and Entry Detail views.

Usage

Filter applied globally to all fields.

add_filter( 'gps_use_choice_text', 'my_custom_function' );

Filter applied to all fields on a specific form.

add_filter( 'gps_use_choice_text_FORMID', 'my_custom_function' );

Filter applied to a specific field on a specific form.

add_filter( 'gps_use_choice_text_FORMID_FIELDID', 'my_custom_function' );

Parameters

$use_choice_text bool

Whether to display choice labels. Default true.

$field GF_Field_Slider

The slider field object.

Examples

Show choice values instead of labels

add_filter( 'gps_use_choice_text', '__return_false' );

Since

  • 1.0.3 Hook added.