Hello EE Team
After a law change we need to validate a given(filled in) date in the ticket registration form. But only if it concerns certain events. For example, if the string “WAB 2” is in the event title, then we need to check if a filled in date date is later/ starts after 2019/12/31 and alert “no registration needed”.
I already do some individual validation in the functions.php like jQuery(document).ready(function() {
jQuery(“input.ee-reg-qstn-20”).attr(“maxLength”, 3);
err_msg1 = “blabla”;
jQuery(“.ee-reg-qstn-zip”).attr(“data-msg”, err_msg1);
…
Can you give us a hint?
Thanks a lot!
Markus
You can add the above to a functions plugin or if available, into your WordPress theme’s functions.php file.
What that will do is add an additional CSS class to the registration form page’s body tag. So you’ll be able to write jQuery that targets only events with the string WAB 2 by starting your selector like this:
$('body[class*=wab-2]')
Viewing 1 reply thread
The support post ‘validating, retrieve event title from registration form’ 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.