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!
Best answer by alex.hongView original
I did also find this topic which sounds relevant. May be worth looking at:
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
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:
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?
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
Posting here to stay updated. Looks like
@jallain is correct and is offering great assistance. I think for general steps if you haven’t tried yet:
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.
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!