AJAX subscription form

The AJAX subscription form as posted in the tips & resources section is not compatible with other forms on the same page. I noticed that when I use a login form that is on the same page as the subscription form it alerts to enter a correct email even though there is no email field in the login form.

The solution is to change the javascript in the subscription form:

from:
$(":submit").click(function() {
to:
$("#subcription_submit").click(function() {

and add
id="subcription_submit"
to the submit input field.

Maybe you can update the demo files accordingly.

Kind regards,
Pete

DavidMartin, 7 years ago

Hey Pete,

Nice catch.  I've updated the demo files.  I changed that line to:

$("#subForm :submit").click(function() {

This way we don't have to add an additional ID to the form. Thanks for your help with this.

Dave Martin

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098