Webflow sync, pageviews & more.
NEW

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

TL;DR
  • Set your form's redirect URL in Webflow's Form Settings and publish the site.
  • Add custom JavaScript in the page's Before tag section to prevent default submission and open the redirect URL in a new tab using window.open().

To have a form submit button open a redirect in a new tab in Webflow, you'll need to use a small custom script because Webflow's native form handling redirects in the same tab.

1. Set a Redirect URL in Your Form Settings

  • Select your form wrapper in the Webflow Designer.
  • In the Element Settings panel, under Form Settings, set the Redirect URL (e.g., https://your-redirect-url.com).
  • Publish your site to apply the changes.

2. Add a Custom Script to Open Redirect in a New Tab

Webflow forms submit via AJAX, and the redirect happens automatically. To override this behavior and open the redirect in a new tab, you'll need to:

  • Go to Page Settings for the page with the form.

  • Scroll to the Before tag custom code section.

  • Add this custom script:

    — This will grab the form submit event, prevent Webflow's default redirect, and instead open the URL in a new tab.

    (Note: Remove the HTML/script tags here for Webflow to accept it)

    ```

    ```

  • Replace https://your-redirect-url.com with your actual destination.

  • Make sure form action remains set — usually this is auto-handled by Webflow, so do not manually alter the form action unless you're using a custom endpoint.

3. Publish and Test It

  • Publish your project again.
  • Test the form on the live (published) domain — custom code won't run in preview mode.

Summary

Webflow forms redirect in the same tab by default, so to open a redirect in a new tab after submission, you must stop Webflow’s native form behavior using custom JavaScript and manually trigger the new tab with window.open().

Rate this answer

Other Webflow Questions