Streaming live at 10am (PST)

Form / Custom action redirects user to different site losing the webflow experience


#1

Hi there,

I'm trying to post the form submission to another site, and there is a problem with the redirect.

If I put a value in the form Action field, for example http://mysite.com/post.php , when the users click the submit button they get redirected to the forms action. What I would expect is that the data is posted to mysite, but the page stays on webflow and shows a success message.

The Redirect field only works when the Action is left to 'Webflow default', so I cannot use it.

The "Normal/Success/Error" pages/messages only work if the Action is left to "Webflow default". In addition to that, the URL of the page when successful will not change (for example to webflow.com/site/success) , so even if I would use the custom Action to post to my site and then try to redirect from my site back to display the success, I don't have a page to redirect to.

Is there anything I'm missing, seems like a faulty functionality, once you submit to a different site you end up on that site, losing the user experience with webflow. It would have been better if you did a POST from javascript and kept the user on the webflow website.

Is there a workaround for this?


#2

Hi @donald, the redirect only works for forms that are submitted to Webflow forms submissions. In order to setup a redirect on a custom form submission, it would be necessary to build that in to the custom form script you are using on the site.

The success/error messages are also only working for forms that are sent to Webflow, but are not activated for custom forms, and that too would need to be custom coded, using our custom code option: http://help.webflow.com/faq/how-to-add-custom-head-and-body-code-to-a-webflow-site, or by editing the form after export.

I hope this helps, if not, let me know and I am happy to assist further.


#3

Thanks @cyberdave . So in the end I understood that by setting the form Action to a separate site, the page will end up redirecting to that site.

So I used the custom code tags to insert a javascript script which intercepts the form submission and let's the webflow site act as usual with showing the success message and at the same time sends the form data to my server via ajax. In case anyone needs the code,


#4

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