Posted: March 4, 2020 at 9:29 am
Hi! I have a radio button selection in my registration form for enrollment to workshops, for which I need to disable the option once maximum capacity is reached which can differ per option.
This would require some significant custom plugin development.
I can point you in the direction of where you can hook in via filter hook and programmatically alter the radio button options. Here’s a link to the source for context: https://github.com/eventespresso/event-espresso-core/blob/55edba0b68c8e34983845a981669665874398fdc/core/db_classes/EE_Question.class.php#L661
So for example the function could start out as:
With access to the 3 objects listed above you can get just about any related data you’ll need to perform the logic of checking number of existing answers in the database and so on. We recommend using the built-in model system for retrieving that data.