Answers.Body: <p>AFAIK this cannot be controlled in CiviCRM ATM. However there is an <a href="https://github.com/twomice/com.joineryhq.profcond" rel="nofollow noreferrer">extension</a>(from Allen Shaw) for conditional filtering on profile but I guess this will not work in your case. </p>
  
  <p>I would suggest you to create an extension and use combination of <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/" rel="nofollow noreferrer">buildForm</a> or <a href="https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_validateForm/" rel="nofollow noreferrer">ValidateForm</a> hook to achieve.</p>
  
  <p>Cheers</p>
  
  <p>Pradeep  </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-13T21:21:38.083Z
Answers.LastActivityDate: 2019-01-13T21:21:38.083Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have a custom event template on which I hide some fields based on whether someone is registering themselves or an additional participant. There are 2 different price options, one for the main registrant and one for the additional participant. The price set needs to have required fields for each situation. How can I get civi to ignore the required fields if they are hidden? </p>
  
Tags: <civievent><custom-templates>
Title: Ignoring a hidden field on event registration form
ThreadText: # Ignoring a hidden field on event registration form
  
  (Asked by: username_0 on 2019-01-13)
  
  I have a custom event template on which I hide some fields based on whether someone is registering themselves or an additional participant. There are 2 different price options, one for the main registrant and one for the additional participant. The price set needs to have required fields for each situation. How can I get civi to ignore the required fields if they are hidden?
  
  **Tags:** civievent, custom-templates
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-13. Score: 1
  
  AFAIK this cannot be controlled in CiviCRM ATM. However there is an [extension](https://github.com/twomice/com.joineryhq.profcond)(from Allen Shaw) for conditional filtering on profile but I guess this will not work in your case.
  
  I would suggest you to create an extension and use combination of [buildForm](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/) or [ValidateForm](https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_validateForm/) hook to achieve.
  
  Cheers
  
  username_1
  
  
  ---
  
  