Skip to main content

Filter: gform_pre_render

Dynamic Hook Name

This hook supports dynamic naming with the following modifiers:

  1. $form_id

Example hook names:

  • gform_pre_render (base hook)
  • gform_pre_render_1 (with first modifier value)

Fired right before the form rendering process. Allow users to manipulate the form object before it gets displayed in the front end.

Parameters

NameTypeDescription
$formarrayThe form object being filtered.
$ajaxbool|nullWhether the form is being displayed via AJAX. Only used when $context is 'form_display'.
$field_valuesarray|nullThe field values to be used to populate the form. Only used when $context is 'form_display'.
$contextstringThe context that the method is being called in. Possible values are 'form_display' and 'form_config'.

Since

  • 2.9.0: Added the $context parameter.

Source

Defined in form_display.php at line 5738