-
-
Save mexiter/14d82a9fb0b2e31b9516b47a9b679cd9 to your computer and use it in GitHub Desktop.
Gravity Forms hook to stop a form from loading
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('gform_pre_render', 'swp_populate_attendee_list'); | |
function swp_populate_attendee_list($form){ | |
$num = swp_get_the_amount(); | |
if ( count( $num ) < 1 ) { | |
add_filter('gform_get_form_filter', create_function('', "return 'You have not met the condition! Please go to <a href=\"/?page_id=1\">this form.</a>';") ); | |
} | |
return $form; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment