gravityflow_step_form

Description

The gravityflow_step_form filter allows the form to be modified before a step using it is processed.

Parameters

ParameterTypeDetails
$formFormThe current form to be processed.
$entryEntryThe current entry to be processed.
$stepStepThe current step being processed.

Usage

The same filter syntax is applied for the current step type through gravityflow_{$this->get_type()}_form

add_filter( 'gravityflow_step_form', 'sh_gravityflow_step_form_example', 10, 3);
add_filter( 'gravityflow_approval_form', 'sh_gravityflow_step_form_example', 10, 3);
add_filter( 'gravityflow_user_input_form', 'sh_gravityflow_step_form_example', 10, 3);
add_filter( 'gravityflow_webhook_form', 'sh_gravityflow_step_form_example', 10, 3);

Examples

add_filter( 'gravityflow_step_form', 'jo_step_form_customization', 10, 3 );
function jo_step_form_customization( $form, $entry, $step ) {
   //Customize the form

   return $form;
}

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?