Solved

Legacy Form is Loading New Tab

  • 2 June 2021
  • 4 replies
  • 667 views

Badge +2

Using the default legacy embed code and when you hit submit, it loads a new tab at https://manage.kmail-lists.com/subscriptions/subscribe with a new form they have to submit to join.  Tried removing the ajax data but it still happens. How do we submit directly without the 2nd step pop up?

icon

Best answer by David To 2 June 2021, 22:35

View original

4 replies

Userlevel 7
Badge +60

Hello @GraphicPass,

Thanks for sharing your question with the Klaviyo Community!

Since this issue does pertain to a legacy form, I would recommend working with a developer you are familiar with to further investigate and troubleshoot this behavior. Klaviyo also has an extensive network of agency partners you can work with as well!

A common solution as you’ve highlighted would be to omit the data-ajax-submit="//manage.kmail-lists.com/ajax/subscriptions/subscribe" from the code altogether to ensure that the custom/legacy code read the following:

<form id="email_signup_aboutus" class="klaviyo_styling klaviyo_gdpr_embed_XXXXXX" action="//manage.kmail-lists.com/subscriptions/subscribe" method="GET" target="_blank" novalidate="novalidate">

Another reason this redirect may be occurring is that 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.

  1. Go to the page where the form(s) exist. Right click on the “email” field of the form and inspect the code.
  2. Confirm the form is a Klaviyo form and take notice to the Form ID and its corresponding JavaScript.
  3. 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.
  4. With this now being separate of the other Klaviyo form, the form should submit as intended with no redirect.

As another work around, you can replace the custom/legacy form you have built out with a Klaviyo built embedded form. Some articles that may prove helpful in learning the difference and capability of the Klaviyo built signup forms, i would recommend looking into the following articles:

Hope this helps!

David

Badge

I had this issue on a plain HTML site and I reordered my scripts so that the Klaviyo scripts ran last on the page (after jquery) this sorted the issue for me. I didn’t need to remove data-ajax-submit="//manage.kmail-lists.com/ajax/subscriptions/subscribe

 

Hope that helps

Badge +1

Same issue with @GraphicPass . In addition, it only happens with mobile devices. I tried to remove data-ajax-submit attribute, checked duplicated IDs. All is not working. It works fine in our laptop devices. Weird…

Opening a new tab is inconvenient for our customers :sweat:

Userlevel 7
Badge +60

Hey @phanan113,

Thanks for that additional detail!

Since you were able to identify that this behavior only occurs on Mobile devices and not desktop devices, I would recommend seeing if you happen to have two separate forms, one for Mobile and one for Desktop where the mobile version of the form may not be updated with the above suggestion. 

I would also recommend working with your developer to investigate this behavior further to see if this may be caused by how the form is interacting with some mobile specific code on your website. Should you need an introduction to a developer, Klaviyo can introduce you to one through the Partners Directory who may be to better assist you in this endeavor. 

David

Reply