No Error Message If Name is Missing

Best Wordpress plugin to engage your users and collect their email. You can use header alerts, popups, or exit pages, and it works with any popular emailing service such as Mailchimp or AWeber
RT77
Junior Member
Posts: 2
Joined: Thu Aug 23, 2012 6:30 am

No Error Message If Name is Missing

Post by RT77 »

If a user only puts an email address with no name it processes the form anyway when it should throw an error.. I can not have this happening, I need them to put their name.
Jean-Christophe Bisoux
Posts: 283
Joined: Tue Feb 28, 2012 10:36 am
Location: Canillo, Andorra

Post by Jean-Christophe Bisoux »

Hi,
you can use Custom Jquery and enter this code :

jQuery("#popup form").submit(function() {
if (jQuery('input[class="name_field"]').val()==""){
alert("your message");
return false;
}
});

If you use prefilled text for the name change this

if (jQuery('input[class="name_field"]').val()==""){

by this

if (jQuery('input[class="name_field"]').val()=="The prefilled text you use"){

Regards,
Post Reply