I have a multipage form, where I would like to display a warning (preferably in a lightbox), that pops up when the user clicks the next button. We need to give the user a notice when only one checkbox is selected from multiple checkbox inputs. The user should then be able to go back and check more off or simply continue to next page.
I have tried to do some jquery, to prevent the submission of the formpage when clicking Next, but I can't get to stop.
Here is what I have:
jQuery(document).bind('gform_post_render', function(event, form_id, current_page){
jQuery('.gform_next_button').click(function(){
if(jQuery('.myinputclass input:checked').length == 1) {
confirm("Are you sure?");
}
return false;
});
});
Might someone have an idea to how I could solve this?
Thanks
Vayu