Answers.Body: <p>This is an interesting use case!  I can see the advantages over the approval workflow.</p>
  
  <p>If I were asked to do this, I'd probably:</p>
  
  <ul>
  <li>Create a custom field "approval code" on the event;</li>
  <li>Use hook_civicrm_buildForm and jQuery to hide the page except for an approval code submission field;</li>
  <li>When the entered code matches the stored value, show the page.</li>
  </ul>
  
  <p>This isn't completely foolproof if you rely too much on client-side jQuery though.</p>
  
  <p>If you decide to go the price-set route, you might want to use <a href="https://github.com/dlobo/org.civicrm.module.cividiscount" rel="nofollow">CiviDiscount</a> instead.  The "discount" code can be the approval code.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-09T02:23:28.230Z
Answers.Text: I would have probably gone down the CiviDiscount route for this too.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-08T19:00:02.710Z
Answers.LastActivityDate: 2015-07-09T02:07:42.543Z
Answers.LastEditDate: 2015-07-09T02:07:42.543Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>Civi 4.6.4 / Drupal 7.38</p>
  
  <p>Goal: Require users to input an access code in order to register for an event.</p>
  
  <p>Use Case: Athletes are encouraged to sign up for events before the registration end date, however, there are often exceptions.  We currently use access codes to allow for those exceptions.  The athlete must contact the coach, who can then provide the code so the athlete can register.  Similar to the approval process within Civi, however less of a burden on the coach (he can manage simply via email) and also easier on athlete as they do not have to request, wait, then register and pay.</p>
  
  <p>Our current solution (outside of civi) implements these codes at the equivalent of a civi price set.  This seems a logical place, as it can work cohesively with start/end dates (ie. The code is required and shows up only after a "standard" price set expires.</p>
  
  <p>Before I build, has anybody solved (either in a price-set or in another way within Civi?)</p>
  
  <p>Thanks,</p>
  
  <p>--Ken</p>
  
Tags: <civievent>
Title: CiviEvent Access Code on price set
ThreadText: # CiviEvent Access Code on price set
  
  (Asked by: username_0 on 2015-07-07)
  
  Civi 4.6.4 / Drupal 7.38
  
  Goal: Require users to input an access code in order to register for an event.
  
  Use Case: Athletes are encouraged to sign up for events before the registration end date, however, there are often exceptions. We currently use access codes to allow for those exceptions. The athlete must contact the coach, who can then provide the code so the athlete can register. Similar to the approval process within Civi, however less of a burden on the coach (he can manage simply via email) and also easier on athlete as they do not have to request, wait, then register and pay.
  
  Our current solution (outside of civi) implements these codes at the equivalent of a civi price set. This seems a logical place, as it can work cohesively with start/end dates (ie. The code is required and shows up only after a "standard" price set expires.
  
  Before I build, has anybody solved (either in a price-set or in another way within Civi?)
  
  Thanks,
  
  --Ken
  
  **Tags:** civievent
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-07-08. Score: 3
  
  This is an interesting use case! I can see the advantages over the approval workflow.
  
  If I were asked to do this, I'd probably:
  
  * Create a custom field "approval code" on the event;
  * Use hook\_civicrm\_buildForm and jQuery to hide the page except for an approval code submission field;
  * When the entered code matches the stored value, show the page.
  
  This isn't completely foolproof if you rely too much on client-side jQuery though.
  
  If you decide to go the price-set route, you might want to use [CiviDiscount](https://github.com/dlobo/org.civicrm.module.cividiscount) instead. The "discount" code can be the approval code.
  
  > **Comments:**
  > **username_2**: I would have probably gone down the CiviDiscount route for this too.  
  
  ---
  
  