Streaming live at 10am (PST)

Form Submit Redirect - Open in a new tab?


#1

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


#2

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: http://sandbox-903b9c.webflow.io/form-submit-new-window


#3

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


#4

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!


#5

@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: https://preview.webflow.com/preview/sandbox-903b9c?preview=2a77d4d5446ddad097abb9bf8603288b


#6

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.


#7

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


#8

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