Description
The gravityflow_can_render_form filter overrides the default behavior for the submit page
and allows any form on a Form Submission step to be displayed in the workflow submit page.
Parameters
Parameter name | Type | Details |
---|---|---|
$can_render_form | Boolean or WP Error | Returns a boolean or a WP_Error object with a message to display to the user |
$form_id | Integer | The id of the form to be rendered. |
Examples
Prevent a specific form from rendering
1 2 3 4 5 6 | add_filter( 'gravityflow_can_render_form' , 'sh_gravityflow_can_render_form' , 10, 2 ); function sh_gravityflow_can_render_form( $can_render_form , $form_id ) { if ( $form_id == '134' ){ $can_render_form = false;} return $can_render_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?