PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Display warning on next button before moving on

  1. 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

    Posted 6 years ago on Thursday February 14, 2013 | Permalink
  2. Can you post a link to the page on your site where this form is embedded and this script is in use?

    Posted 6 years ago on Sunday February 17, 2013 | Permalink
  3. Hi Chris.
    Well,not really. The site is online, but you gotta sign up for it to see the form. You can do this and it requires not cost or credit card. However, this JavaScript code I have added above is not on the production site, it's only on my local machine development site.
    The public site is here where the form is embedded. http://forsikringsdeal.dk/ny-eftersporgsel/ But like I said, you can only see the form if logged in.

    Posted 6 years ago on Sunday February 17, 2013 | Permalink
  4. We'll need to see an example of the code implemented online so we can see why it might not work. Please put up a test page or something with the form and you code so we can see why it's not working.

    Posted 6 years ago on Monday February 18, 2013 | Permalink