3

because of my workaround for this issue I occasionally need to add event participants with the role of "guest" via the admin backend. That's ok, but when I register a guest this way I'm not able to specify the "registered by" data that gets added automatically when an Attendee registers himself and multiple others using the frontend registration form. I'd like to have this info because I need to know which participant the guest belongs to.

I've been putting the name of the main Attendee into the "Participant Source" field just to capture the data, but this of course doesn't show up in the "Registered by" columns in reports.

Is there a hook I could use to copy that Participant Source field into the "registered by" field? Or am I missing a simpler solution?

Thanks! This is a Joomla 3.9.13 system with CiviCRM 5.18.2.

1

Looking at the table "civicrm_participant", I can see a field "registered_by_id", which is presumably the one you want.

I'd note that you're using the field in a way that isn't strictly what it was designed for - i.e. you're taking the person who registers someone else and using that as having a particular relationship to them.

So I can think of three solutions:

  1. Reconsider your requirements/architecture - perhaps add a relationship or some other way of connecting the guest to the primary registrant.

  2. Use an indirect way of filling the registered_by_id field, e.g. have custom registrant/participant field that is only exposed to administrators, and use rules or something like that to fill in registered_by_id when this custom field is filled.

  3. Write an extension that exposes the field to the administrative form.

Short answer: no (no simpler solution).

| improve this answer | |
  • "perhaps add a relationship or some other way of connecting the guest to the primary registrant" - eg a Contact Reference field? – petednz - fuzion Dec 11 '19 at 23:34
  • Hmmm. Interesting suggestions, especially Alan's option 2 and the conference reference field which I hadn't thought about. A third option i'm considering is customizing the civireport to include the "participant source" column (which admittedly, I know I'm not using in the way it was intended!) if the registered_by_id field is empty. But thanks to you both for the creative suggestions! – minbori Dec 12 '19 at 13:18

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.