Action: gform_state_pre_encode
Dynamic Hook Name
This hook supports dynamic naming with the following modifiers:
$form_id
Example hook names:
gform_state_pre_encode(base hook)gform_state_pre_encode_1(with first modifier value)
Allows additional values to be added to the state before it is encoded.
Parameters
| Name | Type | Description |
|---|---|---|
| $state_handler | \State_Handler | The state handler instance. |
| $keys | string|int[] | The keys of the state values that will be encoded. |
| $form_id | int | The ID of the form the state is being generated for. |
Since
Source
Defined in includes/form-display/state/class-state-handler.php at line 128