I’m running into an issue where the the legacy form sometimes redirects to page with another form asking for the email, first name, and last name. But this only seems to happen sometimes. I’ve added the data attributes: data-ajax-submit, target, and novalidate. Thanks in advance for the help!
Issue with Legacy form redirecting on form submission
![Anniversary - 2 years Badge](https://uploads-us-west-2.insided.com/klaviyo-en/attachment/9c1854d8-7db8-4ea0-95f4-085af72d8496_thumb.png)
![Anniversary - 2 years Badge](https://uploads-us-west-2.insided.com/klaviyo-en/attachment/9c1854d8-7db8-4ea0-95f4-085af72d8496_thumb.png)
https://new-imaware.webflow.io/at-home-blood-test/vitamin-d
If you click on “View Sample Report” the form should come up.
I’ve tried omitting data-ajax-submit as suggested in that link but no luck yet sadly
![Anniversary - 2 years Badge](https://uploads-us-west-2.insided.com/klaviyo-en/attachment/9c1854d8-7db8-4ea0-95f4-085af72d8496_thumb.png)
You should be making a POST request from the form. Here’s an article that you can use as reference if you haven’t seen it already: https://help.klaviyo.com/hc/en-us/articles/115005249548-How-to-Add-and-Customize-a-Legacy-Popup
For the “success” function, you can see it should be running after the POST request:
- success: optional, function. Set a custom function to run on a successful AJAX post.
It looks like you have customized the code in some way so perhaps you want to fully control the form and where it sends data to instead of relying on Klaviyo’s code to do it for you?
![Anniversary - 2 years Badge](https://uploads-us-west-2.insided.com/klaviyo-en/attachment/9c1854d8-7db8-4ea0-95f4-085af72d8496_thumb.png)
Hm strange, when I do POST no users gets added to Klaviyo, when I do GET it does. I did GET because that’s what it says to do here: https://help.klaviyo.com/hc/en-us/articles/115005249588-How-to-Add-and-Customize-a-Legacy-Embedded-Signup-Form
Hi
Posting here to stay updated. Looks like
Generally when a sign-up form redirects to a subscribe page, it's because there are two forms on the website with the same id. To remedy this issue, you'll need to update the id of one of the forms. Detailed steps are outlined below.
-
Go to the page where the form(s) exist. Right click on the “email” field of the form and inspect the code.
-
Confirm the form is a Klaviyo form and take notice to the Form ID and its corresponding JavaScript.
-
If there is another form on the page with the same Form ID, the JS will break and cause the form to redirect to the Klaviyo Subscribe page. To prevent this, change the Form ID and Javascript for ONE of the forms to separate the two.
-
With this now being separate of the other Klaviyo form, the form should submit as intended with no redirect.
Looking to see the updates as well!
Alex
Reply
Log in to the Community
Use your Klaviyo credentials
Log in with Klaviyo
Use your Klaviyo credentials
Log in with KlaviyoEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.