How to do a form action (which is an external URL) as well as capture the submit details on the form in webflow?
Short answer: code! You will need to perform the external submission through the use of JS. Useful links:
Thanks Jeandcc
I used this -
"script>
Webflow.push(function() {
('form').submit(function() {
setTimeout(function() {
location.href = 'https://redirecturl?name=' + (’#name’).val() + ‘&email=’ + ('#email').val() + '&phone=' + (’#phone’).val() + ‘&a1=’ + $(’#a’).val();
}, 100);
});
});
"
in order to do the form submission as well as redirect with the url parameters. This removed dependency on action in my specific case.
Hi! Do you know how I would use or change this code to make it dynamic depending on selections made in the form? Essentially the form has to submit and also Redirect to a unique URL depending on options selected in form. Theirs six different options. Any help would be super appreciated!!
Thanks for this, it should be helpful.