Webflow answer

How can I make my form submit button open in a new tab after redirecting in Webflow?

Updated to match Webflow's current help pages.

TL;DR

  • Webflow sites already load jQuery, so there’s nothing to enable.
  • Add a custom jQuery script in the Page Settings' Before </body> tag section to open the form's redirect URL in a new tab, then test after publishing.

To make your form's submit button open a new tab after redirecting to a success page in Webflow, there are some configuration steps needed.

1. Use Custom Code

  • jQuery is already loaded: newly published Webflow sites include jQuery v3.5.1, so the script below can use it.

2. Add Custom Script

  • Go to the Designer: Click on your form and open the form block settings.
  • Insert Code: Use the following jQuery script to ensure the redirect occurs in a new tab:
  • Place this in the Page Settings under the Before </body> tag area for the specific page containing your form.
  • ```javascript

    <script>

    $('form').submit(function(event) {

      event.preventDefault(); // Prevents default form submission

      var url = $(this).attr('action'); // Gets the action URL from the form

      window.open(url, '_blank'); // Opens the URL in a new tab

    });

    </script>

    ```

3. Test Form Submission

  • Publish Changes: After adding the script, publish the site to test the form.
  • Check Functionality: Ensure that on form submission, the redirect target opens in a new tab as intended.

Summary

To make a form submit button open a redirect URL in a new tab in Webflow, use a custom jQuery script attached to the before </body> tag section of the page settings. This ensures that the form redirects as expected without manually editing HTML code.

119 templates come with tabs built in

Start from a site that already has the part you're building.

Browse templates

Other Webflow questions