Filter: gform_field_choice_markup_pre_render
Dynamic Hook Name
This hook supports dynamic naming with the following modifiers:
$this->formId$this->id
Example hook names:
gform_field_choice_markup_pre_render(base hook)gform_field_choice_markup_pre_render_1(with first modifier value)gform_field_choice_markup_pre_render_1_2(with all modifier values)
Allows the HTML for a specific choice to be overridden.
Parameters
| Name | Type | Description |
|---|---|---|
| $choice_markup | string | The choice HTML. |
| $choice | array | The choice properties. |
| $field | \GF_Field_Radio | The current field object. |
| $value | string | The current field value. |
Since
- 1.9.6
- 1.9.12: Added the field specific version.
- 2.4.17: Moved from GF_Field_Radio::get_radio_choices().
Source
- Defined in
includes/fields/class-gf-field-radio.phpat line 382 - Defined in
includes/fields/class-gf-field-radio.phpat line 469 - Defined in
includes/fields/class-gf-field-checkbox.phpat line 1028 - Defined in
includes/fields/class-gf-field-checkbox.phpat line 1094 - Defined in
includes/fields/field-decorator-choice/class-gf-field-decorator-choice-checkbox-markup.phpat line 123 - Defined in
includes/fields/field-decorator-choice/class-gf-field-decorator-choice-radio-markup.phpat line 191 - Defined in
includes/fields/class-gf-field-multiple-choice.phpat line 101