Form Submit Redirect - Open in a new tab?

I’ve added a redirect URL to my form submit button and that’s working fine except I’d like it to open in a new tab. I’m sure this is probably really simple I just don’t know how to do it. =/

Anyone help a n00b?

Thanks!
Nicky P

There are two things needed for this to work:

  1. You need to specify an action for the form. This will disable Webflow’s default form submission handling. You can handle the form submission elsewhere.

  2. You need to set a custom form attribute, target_blank

Demo: Form submit new window

So, if I implement that action will the submissions no longer be stored in webflow’s form center/page for the site?

Hi @pritchettnick, if you would like to have form submissions saved in Webflow, but open redirect on new tab, just use the part about adding the custom form attribute. Leave the Action field to the default.

If you would like form submissions sent to another server, put that server address in the Action field.

I hope this helps!

@cyberdave

Correct me if I’m wrong, but I have in fact tested this out. What you suggested won’t work as the form is submitted to Webflow via AJAX.

http://sandbox-903b9c.webflow.io/form-submit-new-window

These are the current settings:

Share link: Webflow - Sandbox

Hi @samliew, sorry, you are correct, for forms submitted in Webflow, the AJAX is used and the redirect does not open a new tab by default, nor is there a built in option for that.

The custom attribute can still be used on the Webflow form submission, it is just it will have no effect, unless some custom code is used to manipulate that.

Probably some custom javascript that first submit the form by via code and then redirect the page would be needed there.

That is correct. There is no option to override default Webflow form submission functionality without using custom code.

This topic was automatically closed after 60 days. New replies are no longer allowed.