Streaming live at 10am (PST)

Submit button with double function?


#1

Is it possible to have a submit button with double function in one click? When you’d click the button, it would redirect to a link from another website and also would redirect to another page from our webflow site?


#2

So... button will open two links in separate tabs in browser, right?


#3

Yes, but I will still get the info submitted in the form, but then it will open in another browser.

And that current page, after pushing submit, would ALSO go to another page on the site....for example a Thank you page.


#4

Like this: http://custom-forms.webflow.com ?!


$(document).ready(function() {
    $('.submit').click(function(e) {
        window.open('http://google.com', '_blank');
    });
});

.submit is a class that button on form has. You can always set up your form to go to specific page after you submit it:


Code that I gave is making the submit button to first do the second function which - in this case - is a window.open('http://google.com', '_blank'); that opens a new url in new tab. Then it makes what default is - send form and go to page selected in Redirect URL in forms ettings panel.

You're welcome!


#5

Hey! Where do I put this code in? I'm triying on the custom code and doesn't work. Thanks!


#6