Skip to main content

Filter: gform_field_choices

Dynamic Hook Name

This hook supports dynamic naming with the following modifiers:

  1. $this->field->formId

Example hook names:

  • gform_field_choices (base hook)
  • gform_field_choices_1 (with first modifier value)

Allows the HTML for multiple choices to be overridden.

Parameters

NameTypeDescription
$choicesstringThe choices HTML.
$fieldobjectThe current field object.

Since

  • unknown: unknown

Source

  • Defined in includes/fields/field-decorator-choice/class-gf-field-decorator-choice-radio-markup.php at line 100
  • Defined in includes/fields/field-decorator-choice/class-gf-field-decorator-choice-checkbox-markup.php at line 157
  • Defined in includes/fields/class-gf-field-radio.php at line 266
  • Defined in includes/fields/class-gf-field-checkbox.php at line 1122