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.

Advanced Customization: Modal Window Confirmation after Submit

  1. A client asked for this the other day, and I cannot wrap my head around how to accomplish it. Any suggestions are greatly appreciated.

    "We would like a modal window, with a confirmation message to load in after the user submits the form. We would like the modal window to fade out after a few moments, at which point we would like the form to have been cleared."

    Has anyone played with this, or even seen this out in the wild wild web?

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  2. Hi Staats, here is how I would go about doing this.

    • 1 - Set your confirmation type to "redirect" and specify the form page as the the redirection URL + "?confirmation=1" at the end of the URL. It complete URL would look something like this:
      http://yoursite.com/yourformpage/?confirmation=1
    • Now on your form page, you'll want to have some PHP code that checks for the 'confirmation' variable in the $_GET, and when found, would output the javascript that would trigger the modal window.

    Obviously, this is a very high level overview and it does have one problem that might be a show stopper for your client. The page will refresh before the modal window is loaded as the form is redirecting to itself. This is what will "clear" the form.

    There are some more advanced options that would not require a page refresh, but this is the simplest I could think of to hit every requirement and still require minimal code.

    Posted 13 years ago on Friday March 4, 2011 | Permalink
  3. Thanks Dave, that actually did open that aha moment I was looking for. I'll play with some stuff, but I'm sure that a page refresh is, as you said, a show stopper.

    What might make more sense, is to uber customize the ajax confirmation message, count down, and force a refresh.

    Rich

    Posted 13 years ago on Friday March 4, 2011 | Permalink