Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

1Shopping Cart opt in form error page WordPress

  • SOLVED

Hi Guys

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

http://howtobeassertive.com/

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
Steve

Answers (1)

2013-05-31

Arnav Joy answers:

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

jQuery(document).ready(function($){
$('#opt_in_form').submit(function(){
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"