I want to create an event that uses a complex price set, and I want custom validation rules that express relationships among the fields in the price set. For example, if I have a checkbox "Entire Retreat" for participants to say they're registering for the whole event, it should be an error for them also to check the boxes for any individual part of the event. Is there a general-purpose way to configure rules about the entire price set?
1 Answer
You can limit the price options the user sees with some JavaScript in a custom template. This can allow you to control the user options based on the selections. For example:
If the user clicks 'Full Registration' it triggers JavaScript to only show the relevant options. So if meals are included in the user doesn't see the individual meal prices.
You need to do some planning particularly with required fields. If there is a field that you need to be required that relates to individual items you need to have an option for when it is included in the full registration. This will avoid errors.
More information on custom templates can be found here: https://docs.civicrm.org/sysadmin/en/latest/setup/directories/#custom-templates
Hope this helps.
-
Thanks, I'll accept this in a couple days unless someone offers an alternative that doesn't require coding Javascript. May 5, 2018 at 2:31