Support

Home Forums Event Espresso Premium Form validation not working

Form validation not working

Posted: October 1, 2013 at 6:07 am

Viewing 2 reply threads


Marco Genovese

October 1, 2013 at 6:07 am

I’m using into a post this shortcode [ESPRESSO_REG_FORM event_id=2] to show registration form, but the validation of the fields does not work.


Josh

  • Support Staff

October 1, 2013 at 8:18 am

Hi Marco,

We are working on a fix for this. In the meantime you can swap out a few lines of code in /includes/shortcodes.php. Right now it’s:

function espresso_reg_form_sc($atts) {
global $load_espresso_scripts;
$load_espresso_scripts = true; //This tells the plugin to load the required scripts
extract(shortcode_atts(array('event_id' => '0'), $atts));

You can change it to:

function espresso_reg_form_sc($atts) {
	
wp_register_script('jquery.validate.js', (EVENT_ESPRESSO_PLUGINFULLURL . "scripts/jquery.validate.min.js"), array('jquery'), '1.8.1', TRUE);
wp_register_script('validation', (EVENT_ESPRESSO_PLUGINFULLURL . "scripts/validation.js"), array('jquery.validate.js'), EVENT_ESPRESSO_VERSION, TRUE);
wp_enqueue_script('jquery.validate.js'); 
wp_enqueue_script('validation'); 
extract(shortcode_atts(array('event_id' => '0'), $atts));


Marco Genovese

October 1, 2013 at 8:23 am

Hi Josh,
Ok! Thanks a lot.

Viewing 2 reply threads

The support post ‘Form validation not working’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso