Skip to main content

Filter: gform_state_lifespan

Dynamic Hook Name

This hook supports dynamic naming with the following modifiers:

  1. $form_id

Example hook names:

  • gform_state_lifespan (base hook)
  • gform_state_lifespan_1 (with first modifier value)

Allows the state lifespan to be customized.

Parameters

NameTypeDescription
$lifespanintThe state lifespan in seconds. Default is 172800 seconds (2 days).
$form_idintThe ID of the form the state is for.

Since

  • next: next

Source

Defined in includes/form-display/state/class-state-handler.php at line 401