Skip to content

Instantly share code, notes, and snippets.

@mojaray2k
Forked from boreal321/gravity_forms_example_1.php
Last active August 29, 2015 14:08
Show Gist options
  • Save mojaray2k/21e6918f08fdf9254ff8 to your computer and use it in GitHub Desktop.
Save mojaray2k/21e6918f08fdf9254ff8 to your computer and use it in GitHub Desktop.
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