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.

Sidebar disappears on form submit

  1. I have a short form in my sidebar to encourage users to get a quote. If they click submit in this gravity form in the sidebar, they are redirected to a different page in my site that has the extended version of the form.

    The problem is that when the user clicks submit in the smaller form, the other sidebar widgets disappear as does the gravity form, the main content stays, and there is a 2-3 second delay until the user is redirected. Any ideas how to either speed up the redirect and/or stop my sidebar from disappearing in the act of the redirect?

    Thank you!

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  2. We'd need you to post a link to your form page in order to see it happening firsthand to determine what is going on.

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  3. Np. http://rfblife.com ... I can send more info if necessary. Thank you!

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  4. Regarding the delay before redirection, David Smith has posted a work around:

    http://ounceoftalent.com/2010/05/gravity-forms-tip-clean-confirmation-redirects/

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  5. Where should I place the script in that workaround? I put it in my theme's functions.php file, but it resulted in the same outcome.

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  6. Here is an updated bit that might work for you. Place it in your functions.php:

    add_filter("gform_post_submission", "hide_form", 10, 2);
    function hide_form($entry, $form) {
        if($form["confirmation"]["type"] != "message")
            echo "<style type=\"text/css\"> body { display: none; } </style>";
    }
    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  7. Perfect! Thanks for the help all.

    Posted 13 years ago on Tuesday August 24, 2010 | Permalink
  8. littler.chicken
    Member

    Thanks, David, I will have to try that. The lag was kind of bothering me but I thought there was nothing to do about it. Awesome!

    Posted 13 years ago on Thursday August 26, 2010 | Permalink
  9. I tried the function but there was a blank white page for about 10 seconds or so. Any way to fix this?

    Posted 13 years ago on Friday September 24, 2010 | Permalink
  10. All the function does is hide the body content briefly while the page reloads. If it was blank for that long, it sounds like your page was just taking a long time to load which is indicative of a hosting issue or something else in your theme that's causing it to load that slowly.

    Posted 13 years ago on Friday September 24, 2010 | Permalink