Answers.Body: <p>A possible solution is to not use a <code>yes/no</code>-type of Custom Field, but an alpha-numeric one, choose <code>check-box</code> with only one answer as Field Input Type and set the Custom Field as <code>required</code> in the Profile that is added to the Contribution Page.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-20T03:06:38.473Z
Answers.Text: Yep that is how we tend to do these.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-17T13:11:44.427Z
Answers.LastActivityDate: 2023-03-17T13:11:44.427Z
Answers.UserDisplayName: mplh
Body: <p>in my Contribution Page I'd like to ask the donor to accept some privacy rules. For that I'd like to add a custom field into a Profile, add that to the Contribution Page (that works) and only accept the form if the yes/no custom field is answered with a <code>yes</code> (radio button).</p>
  <p>Is that possible? Is there some other possibility to implement my use case in a Contribution Page?</p>
  
Tags: <custom-fields><profile><contribution-page>
Title: How to add a Custom field that requires a certain value in civicrm contribution page?
ThreadText: # How to add a Custom field that requires a certain value in civicrm contribution page?
  
  (Asked by: username_0 on 2023-03-17)
  
  in my Contribution Page I'd like to ask the donor to accept some privacy rules. For that I'd like to add a custom field into a Profile, add that to the Contribution Page (that works) and only accept the form if the yes/no custom field is answered with a `yes` (radio button).
  
  Is that possible? Is there some other possibility to implement my use case in a Contribution Page?
  
  **Tags:** custom-fields, profile, contribution-page
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-03-17. Score: 2
  
  A possible solution is to not use a `yes/no`-type of Custom Field, but an alpha-numeric one, choose `check-box` with only one answer as Field Input Type and set the Custom Field as `required` in the Profile that is added to the Contribution Page.
  
  > **Comments:**
  > **username_1**: Yep that is how we tend to do these.  
  
  ---
  
  