Placeholder participant names

Published
2009-02-12 12:18
Written by
I recently finished writing an addition to the events system that will allow pa's etc to book places for people to events and then return at a later date to confirm the names. As far as I know, this is in progress for v2.3 but basically I need it now. Apart from some testing the system should work without too much trouble. There is only one issue that will perhaps need addressing and that is anonymous signups. As far as I know, CiviCRM will create a new contact record for the person booking if need be and the existing system is preserved so things should work fine. There is an extra button which will make this system work on additional participant pages. Over the next few days I'll test this with v2.2 and see if it is worth getting into the core. How did I do it I hear you say. Well make yourself comfy and I'll tell. At the heart of it is an extra button on the additional participant pages. It says something like 'Just reserve place' and I check for this in postProcess() for the form. I also make sure the amount field IS required rather than ignoring it like you do for a skipped one. Then in AdditionalParticipant->postProcess() I set the email of the skipped participant to the same as the booking contact. I made a small change to CRM_Event_Form_Registration->addParticipant so that the booker's contact_id can be added multiple times to an event. After that it was a case of providing a new link on the EventInfo page to the register update page I created which allowed you to only change the email addresses of your additional participants. Any new emails have a contact created for them and the record in the civicrm_participant table is updated to reflect the new id. That about sums it up really. I think there may be a little checking I need to do with the change I made in addParticipant to make sure a user can't force extra participants in by revisiting the same page. Other than that, it seems to work. EDIT I have created a patch so this can be tested. The patch should work against the 2.1 branch from the subversion repository but there's a good chance it will work with the tarball too. Obviously this will change files so when patching, please make sure you BACKUP FIRST. You can see the files altered from a quick scan of the file. I made the patch against the core files so if you have tailored them to suit in a custom directory you might want to apply the changes manually. note This patch will NOT make the menu item it needs. You'll have to do that manually I'm afraid, in the database. The path in use is: civicrm/event/updateregister with the usual query string e.g. id=2&reset=1&action=preview will get you event 2 in test mode. File civi_2_1_delayed_participants.patch
Filed under

Comments

Hi,

Would it be possible to let the participant change the name directly at a later date instead of doing it from the Back office ?

This is great - two of my clients have wanted something along these lines.

Sometimes participant data only gets updated during the event - eg when you don't know until the day who can make it, or the event organizers can encourage this admin activity when people are in the room. So I might suggest either making that an option or removing it, or documenting how to hack a change, in order of preference.

Thanks for this contribution!

Grab the patch from the above link. If you want to disable the time-lock then search for $now and alter that. As for altering the event participants of others, this patch doesn't allow that. It is based on the original user/booker coming back to the site and updating the details. I'm sure with a bit more tweaking it could be altered so admins can do it for a specific contact's additional participants. Just need to check on security for that though.

hi - sounds great - did you make any progress testing on 2.2?

Sorry, been a bit busy. This feature is being written for v2.3 as a core item. If you can't upgrade then I will do my best to document the changes I did for 2.1 and hopefully it can be used for 2.2 if someone could test for me.