How could I get the participant ID and the corresponding contact ID on the event registration thank-you page? E.g. is there a field (or piece of code) I can insert in /templates/CRM/Event/Form/Registration/DisplayProfile.tpl ?

For participant ID I tried the following but to no avail:

<div class="participant-id hidden">{$participant.id}</div>

Thank you for any tips

  • 2
    you can try inserting {debug} at any line in the file and check the variables that are populating for the template file. Apr 8 '18 at 6:18
  • Thank you for the tip, @jitendra-fuzion, I did what you suggested, and the only helpful variable I see is an array {$participantIDs} ... we only allow one participant so how could I grab the first (and only) item in the array?
    – MtnPavlas
    Apr 9 '18 at 3:17
  • OK - found a good-enough answer for now - posting it below; thank you again for the tip
    – MtnPavlas
    Apr 9 '18 at 3:25

the following did the trick - works in this situation well enough as we only allow registering one participant:


The above grabs the participant ID of the first (and only in our case) participant

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.