CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Fetch participant id at thank you page
Pages: [1]

Author Topic: Fetch participant id at thank you page  (Read 912 times)

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Fetch participant id at thank you page
November 10, 2010, 01:24:48 pm
Hi guys,

I have a specific senario where I need to track participants so

at the thank you page I need to fetch the participant ID from the registrant and save it somewhere,

I've tried civicrm_buildForm hook but it doesn't look like it contains any participant information, how do I achieve this?

I think the correct way is probably invoke the PostProcess hook


Any suggestions?


Cheers

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fetch participant id at thank you page
November 10, 2010, 08:51:49 pm
Quote
I think the correct way is probably invoke the PostProcess hook

Yes.

Kurund
Found this reply helpful? Support CiviCRM

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: Fetch participant id at thank you page
November 11, 2010, 08:04:38 am
Using postProcess for the form CRM_Event_Form_Registration_Register

I did print_r of the $form object

Code: [Select]
CRM_Event_Form_Registration_Register Object
(
    [_participantIDs:protected] =>
    [_participantIDS] => Array
        (
            [0] => 10
        )
   
)

So indeed the participantIDs are there but how would I retrieve the value of it?

I tried to use $form->getVar('_participantIDS'); but not getting any results.


Cheers

xcf33

  • I post frequently
  • ***
  • Posts: 181
  • Karma: 7
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.19/6.20
  • MySQL version: 5.x
  • PHP version: 5.2.6
Re: Fetch participant id at thank you page
November 11, 2010, 01:33:04 pm
I answered my own question

it was more appropriate to use the civicrm_post hook, it took care of everything beautifully.


Cheers!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Fetch participant id at thank you page

This forum was archived on 2017-11-26.