I just upgraded from 3.1.15P to 3.1.35P and I’m having some troubles with form validation on my custom post for the event.
I’ve delete my old single-event_espresso.php and replaced it with the one provided in the post-type-samples folder in the new release package to get everything up to date.
Okay I’ve figured out the issue. For some reason the form validation script was not loading for the post type. I added the following to enqueue script function in my theme’s functions.php:
<code>//Add validation to EE Events custom post type
if (is_singular( 'espresso_event' )) {
wp_enqueue_script('espresso-validate', 'http://omlta.org/wp-content/plugins/event-espresso/scripts/jquery.validate.min.js', array('jquery'), '1.8.1', true);
}</code>
and the following in the actual single-espresso_event.php template:
<code>jQuery('.btn_event_form_submit').click(function() {
//Registration form validation
jQuery('#registration_form').validate();
});</code>
It seems to be working now.
Viewing 1 reply thread
The support post ‘Field Validation and the Event Post Type’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.