Page 1 of 1

No Error Message If Name is Missing

Posted: Thu Aug 23, 2012 6:48 am
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.

Posted: Thu Aug 23, 2012 8:09 am
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,