Answers.Body: <p>I guess the custom fields for Event are not available in smarty on Event registration form but are available on Event information page. But you can retrieve the custom fields for an Event using api. You can use below snippet in tpl file to get custom field data</p>
  
  <pre><code>{crmAPI var='result' entity='Event' action='getsingle' return="custom_81,custom_82" id=$event.id}
  </code></pre>
  
  <p>The return value specifies list of custom fields that i would like to retrieve. You can remove return option if you would like to get all the Event data including custom fields. </p>
  
  <blockquote>
    <p>To print you can use {$result} variable eg. in above case i would use
    <code>{$result.custom_81}</code> and <code>{$result.custom_8}</code></p>
  </blockquote>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-23T15:37:12.120Z
Answers.Text: To clarify, you would use a .tpl.xtra file to display this. See https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-22T10:23:58.057Z
Answers.LastActivityDate: 2018-04-22T10:23:58.057Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I have a custom field set with fields used for managing extra data on the event.
  I want one of the custom fields' value to be shown in its registration form.
  What is the Smarty expression to put in the 'Register.tpl' file so that I could show this custom field in the registration form.
  Clarification - this custom field is not on a Participant, but on the whole event.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-22T19:33:25.253Z
Comments.Text: Just want to be clear that you are talking about Event and not Participant. Custom Participant fields can be set to show on Registration pages through Profiles. Custom Event fields will (out of the box) show on Event Info pages. You may already understand this but noting for others who may read this.
Comments.UserDisplayName: petednz - fuzion
Tags: <civievent><custom-fields>
Title: How to display an Event's custom field on its registration form
ThreadText: # How to display an Event's custom field on its registration form
  
  (Asked by: username_0 on 2018-04-21)
  
  I have a custom field set with fields used for managing extra data on the event.
  I want one of the custom fields' value to be shown in its registration form.
  What is the Smarty expression to put in the 'Register.tpl' file so that I could show this custom field in the registration form.
  Clarification - this custom field is not on a Participant, but on the whole event.
  
  **Tags:** civievent, custom-fields
  
  > **Comments:**
  > **username_1**: Just want to be clear that you are talking about Event and not Participant. Custom Participant fields can be set to show on Registration pages through Profiles. Custom Event fields will (out of the box) show on Event Info pages. You may already understand this but noting for others who may read this.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-04-22. Score: 2 | Accepted answer
  
  I guess the custom fields for Event are not available in smarty on Event registration form but are available on Event information page. But you can retrieve the custom fields for an Event using api. You can use below snippet in tpl file to get custom field data
  
  ```
  {crmAPI var='result' entity='Event' action='getsingle' return="custom_81,custom_82" id=$event.id}
  
  ```
  
  The return value specifies list of custom fields that i would like to retrieve. You can remove return option if you would like to get all the Event data including custom fields.
  
  > To print you can use {$result} variable eg. in above case i would use
  > `{$result.custom_81}` and `{$result.custom_8}`
  
  HTH
  
  username_2
  
  > **Comments:**
  > **username_3**: To clarify, you would use a .tpl.xtra file to display this. See https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates  
  
  ---
  
  