Answers.Body: <p>There IS a viable approach to this, but I don't think it's quite what you're imagining.  Sending the form fields to CiviCRM isn't going to load the CiviContributionPage session object, where much of the data is stored.</p>
  
  <p>Approaches you could take include:</p>
  
  <ul>
  <li>Use template overrides to change the template.  It sounds like you've explored this approach.</li>
  <li>Build the form using <a href="https://www.drupal.org/project/webform_civicrm" rel="nofollow noreferrer">Webform-CiviCRM integration</a>, which gives you much greater control over the look and feel.  This requires Drupal.</li>
  <li>Modify the existing template's HTML after it's rendered using <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_alterContent" rel="nofollow noreferrer">hook_civicrm_alterContent</a>.</li>
  <li>If none of these will satisfy, instead of submitting all the same form elements, instead use the Contribution API to submit your values.</li>
  </ul>
  
  <p>Check out the <a href="https://github.com/webaccess/com.webaccessglobal.simpledonate/blob/master/README.md" rel="nofollow noreferrer">Simple Donate</a> extension as an example of folks who took the last approach.  They're using AngularJS, so the other options weren't on the table for them.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-08T17:35:04.663Z
Answers.LastActivityDate: 2016-12-08T17:35:04.663Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I'm contemplating building my own donation page completely, to have full control over the look and feel. The page should send a donation form to the civicrm server that includes the same form fields as the standard donation page does.</p>
  
  <p>Could someone tell me if this approach is viable? Or am I bound to run into problems at some point? </p>
  
  <p>I am especially interested if the form must include some special codes (in hidden form fields) that I would have to generate myself when creating the custom donation page.</p>
  
Tags: <civicontribute><contribution-page>
Title: Sending a CiviContribute form that's not coming from a standard donation page
ThreadText: # Sending a CiviContribute form that's not coming from a standard donation page
  
  (Asked by: username_0 on 2016-12-08)
  
  I'm contemplating building my own donation page completely, to have full control over the look and feel. The page should send a donation form to the civicrm server that includes the same form fields as the standard donation page does.
  
  Could someone tell me if this approach is viable? Or am I bound to run into problems at some point?
  
  I am especially interested if the form must include some special codes (in hidden form fields) that I would have to generate myself when creating the custom donation page.
  
  **Tags:** civicontribute, contribution-page
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-08. Score: 2 | Accepted answer
  
  There IS a viable approach to this, but I don't think it's quite what you're imagining. Sending the form fields to CiviCRM isn't going to load the CiviContributionPage session object, where much of the data is stored.
  
  Approaches you could take include:
  
  * Use template overrides to change the template. It sounds like you've explored this approach.
  * Build the form using [Webform-CiviCRM integration](https://www.drupal.org/project/webform_civicrm), which gives you much greater control over the look and feel. This requires Drupal.
  * Modify the existing template's HTML after it's rendered using [hook\_civicrm\_alterContent](https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_alterContent).
  * If none of these will satisfy, instead of submitting all the same form elements, instead use the Contribution API to submit your values.
  
  Check out the [Simple Donate](https://github.com/webaccess/com.webaccessglobal.simpledonate/blob/master/README.md) extension as an example of folks who took the last approach. They're using AngularJS, so the other options weren't on the table for them.
  
  
  ---
  
  