Sign Up Form Troubleshooting



If a sign up form is not working as expected, review this guide to explore common issues and solutions to these issues.

Sign Up Form Submits Subscriber to Another Form

If you click the Submit button on a sign up form and are taken to another sign up form, this means there is an issue with the Klaviyo JavaScript code snippet that allows your form to submit properly all on a single page.

The easiest solution is to navigate back to the sign up form builder and re-copy and paste the form code exactly. You can also dive into your current form code and explore the following common issues:

1. Each line of the JavaScript call needs a comma after it except the last line. If you're missing a comma, this will cause a syntax error and the form won't submit on the same page. If you have a comma after the last line of code, this will also cause a syntax error.

2. The HTML form ID doesn't match the ID specified in the JavaScript snippet (or you're missing the JavaScript snippet completely). Note in the example below that the form ID is the same as the ID in the JavaScript, with a  # in front. The ID in the JavaScript must include a #. For example,  #email_subscribe  will work, but email_subscribe will not. This snippet is required for your form to submit.

3. Make sure the Klaviyo sign up library is included on the page.

<script type="text/javascript" src="//"></script>.


Form Fields or Button Don't Disappear on Submit

If you're trying to hide sections of your form after it's submitted, they must be wrapped with a div element with either the klaviyo_field_group or klaviyo_form_actions class. Also make sure you're using the hide_form_on_success option. For example:

General Issues

1. Form isn't working as expected because there are multiple forms with the same ID on a page. This can happen if you use Klaviyo's form builder and add more than one default form without updating the form's ID. To fix this issue, change the form ID for one of the forms and update the corresponding JavaScript. Run a search for all Klaviyo form code on your site if you're concerned there may be conflicting form code (or partial form code) with the same ID.

2. Success message doesn't appear after form is submitted. Your form needs to include a div with the class of success_message. This is where Klaviyo will put the success message after a form is submitted and it's the element Klaviyo will show after a successful submission.


3. Form doesn't redirect to the correct URL after it's submitted. Make sure that there is an http:// in front of the URL in the success setting.

4. Form submits, but no one is being added to the list. If your list has double opt-in enabled, new subscribers will receive an email after opting in that prompts them to confirm their email address. Only after a new subscriber confirms his/her email address will this person be added to your list. If you're testing out a new form with fake or invalid test email addresses and you have double opt-in enabled, you will not see these email addresses added to your list.

Was this article helpful?
1 out of 8 found this helpful