Ask your WordPress questions! Pay money and get answers fast! (more info)

1Shopping Cart opt in form error page WordPress


Hi Guys

I've got an opt in form installed on this site

My client pointed out that if you dont fill in the fields and just click the download button you land on an ugly 1Shopping Cart (form provider) error page.

Does anyone know how I can change that behaviour without messing up my form?

Many thanks

Answers (1)


Arnav Joy answers:

you can stop submission of form using jquery validation , use following jquery code

var opt_in_name = $('#opt_in_name').val();
var opt_in_email = $('#opt_in_email').val();

if( opt_in_name == '' || opt_in_name == 'Enter your name' || opt_in_email == '' || 'Enter your email' )
return false;

but you have to place id for

1. form , id = "opt_in_form"
2. name input box , id = "opt_in_name"
3. email input box , id = "opt_in_email"