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) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event participants can invite a guest: how do I manage (and count) them?
Pages: [1] 2

Author Topic: Event participants can invite a guest: how do I manage (and count) them?  (Read 7247 times)

maxferrario

  • Guest
Event participants can invite a guest: how do I manage (and count) them?
July 18, 2008, 03:48:36 am
Hi all,
I am evaluating CiviCRM as a tool to manage an event we are organizing later his year.

My colleagues will send invitations to a number of people, who will come alone or with a guest (guest = someone who is NOT in our contact list).

I am looking for a way to a) add the info about the presence of a guest at the time of confirmation (online or via "backoffice" if they confirm by email/telephone) and b) count the guests in the participants list.

We could probably add the guest to the participants list during a phone call, but this requires more work - as we must ask for the guest details - and could be seen as an "intrusion" in the participants privacy ("why the heck do you want the name and email of my guest?!?"). Moreover, if the confirmation is sent via email or done online, I do not see av easy solution.

For me, the best solution would be adding a checkbox on the "add contact to event" page saying something "participant will bring a guest with him". The checkbox, if checked, will make that contact count as two persons in the total number of confirmations for the events.

Any idea how to get this done?

Thanks

Massimo

PS
I am a completely CiviCRM newbie, but I do know Drupal a little and PHP rather well, so I am not scared about some coding.

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Event participants can invite a guest: how do I manage (and count) them?
July 18, 2008, 06:11:29 am
Massimo,

If I understood your requirements well, quick solution I see is using custom fields to extend participation record ("participant will bring a guest with him"). Take a look at CiviCRM documentation to see how it's done (http://docs.civicrm/org). This way, for both online and offline registration, you'll know who's bringing guests and who's not.

Counting some participants twice is a little more complicated: you can do it manually  - search for all the participants, which will give you the number X, than search for all the participants bringing guests with them (Y) and than make a calculation: (X - Y) + Y * 2
To automate it, you'll need to write up some code (custom search, or separate plain db query) which will do the same for you and give you the number right away.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

maxferrario

  • Guest
Re: Event participants can invite a guest: how do I manage (and count) them?
July 18, 2008, 11:00:15 am
Well, it doesn't sound too difficult to automate the process.
Can you please point me to some documentation about the table(s) to query to get the results, executing queries in the CiviCRM way (using its API, I mean) and putting the result in the pages?
I cannot ask my colleague to do boring math calculation or to look for the info in strange places, so my best option would be to replace the participants counter with my own calculation (best of all would be replace it in every CiviCRM calculation, so I can stop registration automatically).
I guess I will also need to modify the templates to get the display right...

Thanks in advance

Massimo

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Event participants can invite a guest: how do I manage (and count) them?
July 18, 2008, 09:30:20 pm
Alternative approaches to this would be:

1. Using the "Price Set" feature where you would have one Price Set field - type = "Text / Numeric Quantity". You would use a label and "help" for this field telling people to enter the total number of participants they are signing up for (and assign a price per participant - assuming this isn't a free event). This mechanism will work for both online and backoffice registrations. Exporting the participants to CSV will give you a column with the price set field "counts".

2. For online registrations - there's a new feature coming in 2.1 to allow one person to register multiple pariticipants. In this case the automated "maximum participants" feature is in effect - and each guest becomes a contact in your DB. However you will be asking the person registering to provide at least an email address for each guest - which may not fit your needs.
Protect your investment in CiviCRM by  becoming a Member!

maxferrario

  • Guest
Re: Event participants can invite a guest: how do I manage (and count) them?
October 13, 2008, 08:00:01 am
Hi Dave,
I am trying (after some months!) to implement your solution n°1, i.e. using the price set feature to fake the registration process.

Apparently the trick is enough for us, but we would like to hide the "Event Fee(s)" label from the registration page as we do not want to "scare" our contacts who know that the event is free.

Can you give me some advice to change this?
  • Is it possible to change the localization file (civicrm.mo - I will use CiviCRM in italian) to blank the translation for that string?
  • Is there a template/CSS way to hide the label? I tried to look at the page source but I cannot even find that string...

Thanks a lot
Massimo

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Event participants can invite a guest: how do I manage (and count) them?
October 13, 2008, 08:25:29 pm
Massimo - the label "Event Fee" is a default that can be changed to anything you like - "Registration Info" or ....

Go to Configure Event >> Event Fees ... and you'll see a field called "Fee Label" where you can configure this label.
Protect your investment in CiviCRM by  becoming a Member!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Event participants can invite a guest: how do I manage (and count) them?
October 13, 2008, 08:30:57 pm
That's a bit like finding the sunglasses you were looking for are on top of your head  ;D
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

maxferrario

  • Guest
Re: Event participants can invite a guest: how do I manage (and count) them?
October 14, 2008, 03:56:53 am
Quote from: Dave Greenberg on October 13, 2008, 08:25:29 pm
Massimo - the label "Event Fee" is a default that can be changed to anything you like - "Registration Info" or ....

Go to Configure Event >> Event Fees ... and you'll see a field called "Fee Label" where you can configure this label.

Thanks Dave, but I am not THAT new to Civicrm  ;)
I have already customized the label, but there is another label that I would like to customize on the new event registration page.

Please see the attached screenshot that shows the label I would like to modify/remove (an image is sometimes worth a thousand words).
The label I already configured and that you suggested to modify is "numero dei partecipanti"

maxferrario

  • Guest
Re: Event participants can invite a guest: how do I manage (and count) them?
October 14, 2008, 04:11:47 am
Quote from: Dave Greenberg on October 13, 2008, 08:25:29 pm
Massimo - the label "Event Fee" is a default that can be changed to anything you like - "Registration Info" or ....

Go to Configure Event >> Event Fees ... and you'll see a field called "Fee Label" where you can configure this label.

Now I see that the label I want to modify is not shown in the online registration pag : it's only shown if I add a participant from the administration pages (Contact / Events / New event registration). So, if it is only an "internal" label it is not important for me to change it.

BUT, having enabled the registration page shows me another problem: as I am using fake fees, CiviCRM wants me to associate a payment processor to the event.
I tried the dummy processor, but even if dummy it anyway shows credit card and billing fields on the registration page.
Obviously I do not want them to appear as the fee is only used to count participants + optional additional person that they can bring with them: my guests will never give me CC infos for the event.

Is there some special trick to modify the dummy processor output?

Thanks a lot for you time.

Massimo

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Event participants can invite a guest: how do I manage (and count) them?
October 14, 2008, 02:08:05 pm
Hmm - Given that this is a free event, the better approach might be to create one or more custom fields "Used For" Participants which can be used to record "additional participant" count and / or other details. You can then expose this (or these) custom fields in your online registration using a Profile. You will still need to create a custom query (or custom search) to aggregate your participant counts.
Protect your investment in CiviCRM by  becoming a Member!

maxferrario

  • Guest
Re: Event participants can invite a guest: how do I manage (and count) them?
October 16, 2008, 08:09:31 am
Quote from: Dave Greenberg on October 14, 2008, 02:08:05 pm
Hmm - Given that this is a free event, the better approach might be to create one or more custom fields "Used For" Participants which can be used to record "additional participant" count and / or other details. You can then expose this (or these) custom fields in your online registration using a Profile. You will still need to create a custom query (or custom search) to aggregate your participant counts.
Thanks Dave, I created a custom field and added it to the registration form: even if I am still learning, it was an easy task.
But now I am stuck with the difficult part: the custom query/search.  :(
I found the Custom Search Components (http://wiki.civicrm.org/confluence/display/CRMDOC/Custom+Search+Components) page in the documentation. Apparently my first task is to write a query that aggregates the values of my custom field for all participants: in this way I could get the total number of people participating at the events (registered participants + their guests, but I do not even sure in which tables/fields the value is stored.
I have found this http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+ERD+2.0 tables diagram for civicrm 2.0: are custom fields added to "custom_value_1_dis" and "custom_value_1_dat" tables?
Could you please point me to a simple tutorial that can possibly help me in constructing the query? I do know SQL, but it is difficult to plan a query when you do not clearly know where the data are stored and how the tables are linked (I hope to extract the last information from the ERD).
Thank you very much.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Event participants can invite a guest: how do I manage (and count) them?
October 16, 2008, 01:42:10 pm
First - since you're using a custom field, a simple solution to getting counts is to "Export" participant data for the event from CiviEvent >> Find Participants. The export will include your "Guests" column and you can probably write a pretty simple macro to total that column's values and add it to the number of rows (each participant is a row).

If this is not a good approach, and you want to build a custom search - some pointers on the DB structure:
* each participant is stored in a civicrm_participant row, with an FK to the event_id (civicrm_event.id)
* your custom field values are stored in a table with the name: civicrm_value_$yourCustomDataGroupName
* in that table, the entity_id is an FK to the participant record id, and the guest count should be stored as an INTEGER column called $yourFieldName

(Note that the table names and column names are your "labels" altered to be legal / unique db 'names' - 'My Field' becomes 'my_field_N' where N is an incrementing integer.)
Protect your investment in CiviCRM by  becoming a Member!

maxferrario

  • Guest
Re: Event participants can invite a guest: how do I manage (and count) them?
October 16, 2008, 01:55:32 pm
Thanks Dave.
As exporting and counting is not the right approach (we have a limited amounts of places for the event and we must stop off-line registrations when the limit is reached) I will try to build a query based on the infos you gave me.

maxferrario

  • Guest
Re: Event participants can invite a guest: how do I manage (and count) them?
October 20, 2008, 06:43:01 am
Hi Dave (and Michał, who first proposed the solution to my problem),
after a short trial-and-error process I have now created the Custom Search that aggregates the total number of participants to my event.

I have one question now: as I have no need at the moment to ask for parameters, is it possible to run the search component without compiling the (in my case fake) form?

I think it would be nice to put a link in the main CiviEvent page (/civicrm/event?reset=1) to let my co-workers to go directly to the page that shows the running sum of all participants to the event. Best of all, obviously, would be to display the result of the custom search directly in the "Participants" columns of the main table in the page.

Thanks again for the help.

Massimo

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Event participants can invite a guest: how do I manage (and count) them?
October 20, 2008, 10:05:12 am
Try adding &force=1 to the query string for your custom search. I think this will trigger the search with default criteria.
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event participants can invite a guest: how do I manage (and count) them?

This forum was archived on 2017-11-26.