Skip to main content

Filter: gform_field_choices

Dynamic Hook Name

This hook supports dynamic naming with the following modifiers:

  1. $this->formId
  2. $this->id

Example hook names:

  • gform_field_choices (base hook)
  • gform_field_choices_1 (with first modifier value)
  • gform_field_choices_1_2 (with all modifier values)

Modify the checkbox items before they are added to the checkbox list.

Parameters

NameTypeDescription
$choicesstringThe string containing the choices to be filtered.
$fieldobjectThe field currently being processed.

Since

  • Unknown: Unknown

Source

  • Defined in includes/fields/class-gf-field-checkbox.php at line 1119
  • Defined in includes/fields/field-decorator-choice/class-gf-field-decorator-choice-radio-markup.php at line 98
  • Defined in includes/fields/field-decorator-choice/class-gf-field-decorator-choice-checkbox-markup.php at line 155
  • Defined in includes/fields/class-gf-field-radio.php at line 266