PDA

View Full Version : No Error Message If Name is Missing



RT77
08-23-2012, 05:48 AM
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
08-23-2012, 07:09 AM
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,