Hey there. I’m trying to create a “Group” ticket option that requires a minimum of five attendees to be registered in order to be used. I’m thinking of a JS validation script along the lines of…
jQuery(document).ready(function(){
jQuery(“#registration_form”).submit(function (e) {
if(jQuery(‘#price_option-2’).val() == ‘173|General Admission (Groups of 5 or More)’){
if(jQuery(‘.espresso_add_attendee’).length < 4){
e.preventDefault();
alert(‘Please register at least five attendees.’);
}
}
});
But, I have no clue where I should place this. Or, would a script like that even work? Thanks for the help.
PS. I would assume the most effective location for this would be in the validation.js, but I’m not having any luck getting it to cooperate. Not a JavaScript ninja, just trying to get by with this one script. Thanks again!
Placement depends on what you are trying to change – is it the registration page or the cart?
If the registration page, then the registration_page_display.php would be a good candidate, if the cart then the shopping_cart.php.
Ideally you should copy these to the uploads/espresso/templates folder and edit them there (you will need to copy registration_page.php as well if you are editing the registration_page_display.php they are linked files).
Viewing 2 reply threads
The support post ‘Group Ticket Option – Validating Minimum Number of Registrations’ 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.