Answers.Body: <p>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:</p>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>More information on custom templates can be found here: <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/directories/#custom-templates" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/setup/directories/#custom-templates</a></p>
  
  <p>Hope this helps.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-05T02:31:13.427Z
Answers.Text: Thanks, I'll accept this in a couple days unless someone offers an alternative that doesn't require coding Javascript.
Answers.UserDisplayName: A. Jesse Jiryu Davis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T17:41:49.283Z
Answers.LastActivityDate: 2018-05-04T17:41:49.283Z
Answers.UserDisplayName: KilakwaBT
Body: <p>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?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-04T19:29:25.310Z
Comments.Text: What CMS are you using? Drupal Webform can deliver some very complex options thanks to webform conditionals
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-05-05T02:28:34.457Z
Comments.Text: I'm using WordPress.
Comments.UserDisplayName: A. Jesse Jiryu Davis
Tags: <civievent><price-sets>
Title: CiviEvent price set custom validation rules
ThreadText: # CiviEvent price set custom validation rules
  
  (Asked by: username_0 on 2018-05-04)
  
  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?
  
  **Tags:** civievent, price-sets
  
  > **Comments:**
  > **username_1**: What CMS are you using? Drupal Webform can deliver some very complex options thanks to webform conditionals  
  > **username_0**: I'm using WordPress.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-05-04. Score: 0 | Accepted 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.
  
  > **Comments:**
  > **username_0**: Thanks, I'll accept this in a couple days unless someone offers an alternative that doesn't require coding Javascript.  
  
  ---
  
  