Answers.Body: <p>There is a similar but slightly different approach that allows the user to enter any amount for a donation. It is mentioned in the documentation for a membership price set, but equally would work for events:<br />
  <a href="https://docs.civicrm.org/user/en/latest/membership/membership-price-sets/#non-membership-price-fields" rel="nofollow noreferrer">https://docs.civicrm.org/user/en/latest/membership/membership-price-sets/#non-membership-price-fields</a></p>
  <p>Add a Price field to your price set with these options:</p>
  <ul>
  <li>Field Label: Choose a suitable name and include the currency symbol e.g. 'Donation £'</li>
  <li>Input field Type: 'Text / Numeric Quantity'</li>
  <li>Price: 1</li>
  <li>Financial Type: 'Donation'</li>
  <li>Display Amount?: Uncheck this option</li>
  </ul>
  <p><a href="https://i.sstatic.net/JWA2y.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/JWA2y.jpg" alt="enter image description here" /></a></p>
  <p>One caveat of this approach is that a user could enter a negative number in this field to dishonestly receive a discount!</p>
  <p>Although there is an extension that was created to prevent exactly this situation: <a href="https://civicrm.org/extensions/negative-negator" rel="nofollow noreferrer">https://civicrm.org/extensions/negative-negator</a></p>
  <p>I actually really like approach of Lionel Smith-Gordon's answer, and I might decide to use it myself for simplicity, however I wanted to add this alternative here so people were aware of this approach.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-13T16:15:24.527Z
Answers.LastActivityDate: 2021-05-13T16:15:24.527Z
Answers.UserDisplayName: dading84
Answers.Body: <p>Simply set up an additional line item for a donation in a Price Set.</p>
  
  <p>This is how I do it... the Price Set definition:
  <a href="https://i.sstatic.net/8414u.jpg" rel="noreferrer"><img src="https://i.sstatic.net/8414u.jpg" alt="Price Set definition"></a></p>
  
  <p>And then how the 'Optional Donation' is defined:
  <a href="https://i.sstatic.net/hm4Om.jpg" rel="noreferrer"><img src="https://i.sstatic.net/hm4Om.jpg" alt="enter image description here"></a></p>
  
  <p>And a preview of this in action:</p>
  
  <p><a href="https://i.sstatic.net/Rfpgi.jpg" rel="noreferrer"><img src="https://i.sstatic.net/Rfpgi.jpg" alt="enter image description here"></a></p>
  
  <p>Feel free to give it a whirl on my website - and make a donation if you like it! :-)
  <a href="http://www.breinton.com/book/hipp-abbate" rel="noreferrer">http://www.breinton.com/book/hipp-abbate</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-13T20:35:55.397Z
Answers.Text: How do you sort out what is tax-deductible Donations from Event Fees? This looks like everything would be reported the same, either all of it is tax-deductible or none of it is tax-deductible.
Answers.UserDisplayName: Iowa Boy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-15T15:25:20.120Z
Answers.Text: You're awesome! Thank you! I'm in the US, so won't be able to attend a recital, but I enjoyed making a donation using your form.
Answers.UserDisplayName: JoeEdNonprofit
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-15T14:32:58.923Z
Answers.LastActivityDate: 2015-08-15T14:32:58.923Z
Answers.UserDisplayName: Lionel Smith-Gordon
Body: <p>I'm trying to give people an option to add donations to special projects when they register for a particular event. We could just point folks to the contributions pages, but it would be more effective/convenient to just roll the donations into the event registration form. </p>
  
  <p>Any advice on a strategy to accomplish this?</p>
  
  <p>What I've tried so far: </p>
  
  <ul>
  <li>A developer friend suggested adding custom profile fields to the
  Register.tpl template and then saving the donation amounts to the
  custom fields using an ajax call. I've got that working.</li>
  <li>I'm not sure how to add my custom donation field values to the event 
  amounts, which would be needed in order to actually charge people for
  their donations during the event confirmation and payment pages. 
  (I've tried using the postProcess and buildForm hooks, but don't see
  how/where to change the "amounts" values.)</li>
  </ul>
  
  <p>(CiviCRM 4.1.6; Drupal 6)</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-08-15T12:21:20.220Z
Comments.Text: By the way, I'm super desparate to figure this out (our organization gets almost all our engagement around a single event) . So, any tips or ideas would be really helpful!
Comments.UserDisplayName: JoeEdNonprofit
Tags: <civievent><api><hooks>
Title: Add Donations to Event Registration Form
ThreadText: # Add Donations to Event Registration Form
  
  (Asked by: username_0 on 2015-08-15)
  
  I'm trying to give people an option to add donations to special projects when they register for a particular event. We could just point folks to the contributions pages, but it would be more effective/convenient to just roll the donations into the event registration form.
  
  Any advice on a strategy to accomplish this?
  
  What I've tried so far:
  
  * A developer friend suggested adding custom profile fields to the
    Register.tpl template and then saving the donation amounts to the
    custom fields using an ajax call. I've got that working.
  * I'm not sure how to add my custom donation field values to the event
    amounts, which would be needed in order to actually charge people for
    their donations during the event confirmation and payment pages.
    (I've tried using the postProcess and buildForm hooks, but don't see
    how/where to change the "amounts" values.)
  
  (CiviCRM 4.1.6; Drupal 6)
  
  **Tags:** civievent, api, hooks
  
  > **Comments:**
  > **username_0**: By the way, I'm super desparate to figure this out (our organization gets almost all our engagement around a single event) . So, any tips or ideas would be really helpful!  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-08-15. Score: 7 | Accepted answer
  
  Simply set up an additional line item for a donation in a Price Set.
  
  This is how I do it... the Price Set definition:
  [![Price Set definition](https://i.sstatic.net/8414u.jpg)](https://i.sstatic.net/8414u.jpg)
  
  And then how the 'Optional Donation' is defined:
  [![enter image description here](https://i.sstatic.net/hm4Om.jpg)](https://i.sstatic.net/hm4Om.jpg)
  
  And a preview of this in action:
  
  [![enter image description here](https://i.sstatic.net/Rfpgi.jpg)](https://i.sstatic.net/Rfpgi.jpg)
  
  Feel free to give it a whirl on my website - and make a donation if you like it! :-)
  <http://www.breinton.com/book/hipp-abbate>
  
  > **Comments:**
  > **username_0**: You're awesome! Thank you! I'm in the US, so won't be able to attend a recital, but I enjoyed making a donation using your form.  
  > **username_3**: How do you sort out what is tax-deductible Donations from Event Fees? This looks like everything would be reported the same, either all of it is tax-deductible or none of it is tax-deductible.  
  
  ---
  
  ### Answer by username_1 on 2021-05-13. Score: 1
  
  There is a similar but slightly different approach that allows the user to enter any amount for a donation. It is mentioned in the documentation for a membership price set, but equally would work for events:  
  <https://docs.civicrm.org/user/en/latest/membership/membership-price-sets/#non-membership-price-fields>
  
  Add a Price field to your price set with these options:
  
  * Field Label: Choose a suitable name and include the currency symbol e.g. 'Donation £'
  * Input field Type: 'Text / Numeric Quantity'
  * Price: 1
  * Financial Type: 'Donation'
  * Display Amount?: Uncheck this option
  
  [![enter image description here](https://i.sstatic.net/JWA2y.jpg)](https://i.sstatic.net/JWA2y.jpg)
  
  One caveat of this approach is that a user could enter a negative number in this field to dishonestly receive a discount!
  
  Although there is an extension that was created to prevent exactly this situation: <https://civicrm.org/extensions/negative-negator>
  
  I actually really like approach of username_2's answer, and I might decide to use it myself for simplicity, however I wanted to add this alternative here so people were aware of this approach.
  
  
  ---
  
  