Skip to main content

Filter: gform_field_choices_max_count_visible

Dynamic Hook Name

This hook supports dynamic naming with the following modifiers:

  1. $form_id

Example hook names:

  • gform_field_choices_max_count_visible (base hook)
  • gform_field_choices_max_count_visible_1 (with first modifier value)

A filter that allows for the setting of the maximum number of choices shown in the form editor for choice based fields (radio, checkbox, image, and multiple choice).

Parameters

NameTypeDescription
$max_choices_visible_countintThe default number of choices visible is 5.
$fieldobjectThe current field object.

Since

  • 2.9

Source

  • Defined in includes/fields/class-gf-field-radio.php at line 215
  • Defined in includes/fields/class-gf-field-checkbox.php at line 966
  • Defined in includes/fields/field-decorator-choice/class-gf-field-decorator-choice-checkbox-markup.php at line 58
  • Defined in includes/fields/field-decorator-choice/class-gf-field-decorator-choice-radio-markup.php at line 47