Answers.Body: <p>There was an old recipe at <a href="https://civicrm.org/blog/chrischinchilla/displaying-remaining-participant-slots-on-events" rel="nofollow noreferrer">https://civicrm.org/blog/chrischinchilla/displaying-remaining-participant-slots-on-events</a> saying</p>
  <pre><code>{crmAPI var=&quot;ParticipantS&quot; entity=&quot;Participant&quot; action=&quot;get&quot; sequential=&quot;1&quot; event_id=$event.id }
  // Gets the current particiapnst registered for the event
  
  {* $x=$event.max_participants, $y=$ParticipantS.count *}
  // Assigns our variables for the calculation below
  
  Remaining - {math equation=&quot;x - y&quot; x=$event.max_participants y=$ParticipantS.count}
  // Subtract the current particpants from the maximum.
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-19T06:53:35.883Z
Answers.LastActivityDate: 2020-08-19T06:53:35.883Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>If you haven't done this already - I recommend customising the template. I have experience of doing this. You'll want to create a templates override file, and then embed some PHP that accesses the remaining places. It's fairly straightforward. If you want me to go into more details then please message me!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-28T13:48:23.580Z
Answers.Text: That would be great, we're definitely interested. How do I message you on this forum?
Answers.UserDisplayName: pixelshark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-28T21:28:55.107Z
Answers.Text: Email me at john@civifirst.com and I'll get back to you :)
Answers.UserDisplayName: JohnFF
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-27T13:22:09.637Z
Answers.LastActivityDate: 2016-02-27T13:22:09.637Z
Answers.UserDisplayName: JohnFF
Body: <p>We need to display how many spots are left for registration on the public event registration page. Is there a way to do this?</p>
  
Tags: <civievent>
Title: How to display remaining available spots for an event on the public page
ThreadText: # How to display remaining available spots for an event on the public page
  
  (Asked by: username_0 on 2016-01-08)
  
  We need to display how many spots are left for registration on the public event registration page. Is there a way to do this?
  
  **Tags:** civievent
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-08-19. Score: 1
  
  There was an old recipe at https://civicrm.org/blog/chrischinchilla/displaying-remaining-participant-slots-on-events saying
  {crmAPI var="ParticipantS" entity="Participant" action="get" sequential="1" event_id=$event.id }
  // Gets the current particiapnst registered for the event
  
  {* $x=$event.max_participants, $y=$ParticipantS.count *}
  // Assigns our variables for the calculation below
  
  Remaining - {math equation="x - y" x=$event.max_participants y=$ParticipantS.count}
  // Subtract the current particpants from the maximum.
  
  
  ---
  
  ### Answer by username_2 on 2016-02-27. Score: 1
  
  If you haven't done this already - I recommend customising the template. I have experience of doing this. You'll want to create a templates override file, and then embed some PHP that accesses the remaining places. It's fairly straightforward. If you want me to go into more details then please message me!
  
  > **Comments:**
  > **username_0**: That would be great, we're definitely interested. How do I message you on this forum?  
  > **username_2**: Email me at john@civifirst.com and I'll get back to you :)  
  
  ---
  
  