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:

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

and add
to the submit input field.

Maybe you can update the demo files accordingly.

Kind regards,

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

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free