Support

Home Forums Event Espresso Premium Require a ticket if another ticket is selected

Require a ticket if another ticket is selected

Posted: December 19, 2016 at 10:45 am

Viewing 5 reply threads


thomaspointbeach

December 19, 2016 at 10:45 am

Is there a way to require one ticket be selected if another is selected? For instance: If I have 2/3/4-day Adult and Teen tickets, is it possible to have the system balk if, say, a 3-day Teen is selected, but either no Adult, or a 2-Day Adult?

I am a developer, so really, hints on where to intercept validation and how to throw an error would be what I need.


Josh

  • Support Staff

December 19, 2016 at 1:15 pm

How about conditionally disabling the qty select inputs using some jQuery instead of throwing errors? This way it will force the user to select an Adult ticket before they can select a Teen ticket.


thomaspointbeach

December 19, 2016 at 10:20 pm

You know as well as I do that trusting user-space to do validation is not a solution. It is a stop-gap, to be sure, but not a solution.


Josh

  • Support Staff

December 20, 2016 at 7:45 am

You can add something server side then, along with the jQuery. As far as hints go, you can have a look at /modules/ticket_selector/EED_Ticket_Selector.module.php.

There are hooks and filters in that module. If you require more, then you can add them, and submit a pull request to the Github repository.


thomaspointbeach

December 20, 2016 at 8:02 am

Are there repos for the other plugins that I can submit against? IE the bar code scanner, etc?


Josh

  • Support Staff

December 20, 2016 at 8:15 am

Yes, and you can request access to the add-on’s Github repositories here:

https://eventespresso.com/developers/request-repo-access/

Viewing 5 reply threads

The support post ‘Require a ticket if another ticket is selected’ 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