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) »
  • How to create a group during registration to an event ?
Pages: [1]

Author Topic: How to create a group during registration to an event ?  (Read 783 times)

gvincke

  • Guest
How to create a group during registration to an event ?
August 20, 2009, 04:11:53 am
Hi,
Context :
I use CiviCRM 2.2.0 in Drupal 6.13.
The website is devoted to a belgian non-profit association.
We organise a karting race and a touristic rally to collect funds.

What works
I created an event, some profiles, etc.. People are actually registering themselves, receive a confirmation email with all price and payment information.
I receive a copy of all these email.
Each contact is automatically added to a group named "karting drivers 2009"

Waht I do not succeed to setup
In the driver's profile I added a field named "Name of your Team".
This can accept only one value for each contact.
So, if someone try to subscribe for 2 teams (Myteam 1, MyTeam 2, and maybe more), I receive two subcriptions by email, but only the latest "Name of your team" is associated to him as a contact when I check his personnal informations.

What i hope ?
I try to set up this Field to be a group to create during registration to the event. This group will be automatically added to a "karting teams 2009" predefined group, and the subscriber has to be automatically add to it.

Actually I have to do this manually at each subscription, but I want it to be automated, if possible.

Does someone has a solution ?

What I dream of
After that it would so nice to be possible to set up a list of teams that are registered to the event. The list of registered people are focused on contacts, not on groups. Do you know if there is a solution to setup this ?
I know quite well PHP and MYSQL so do some hacking based on quite explanaitions should'nt be a problem if necessary.

Thanks a lot in advence.

Grégoire.
« Last Edit: August 20, 2009, 04:14:41 am by gvincke »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to create a group during registration to an event ?
August 20, 2009, 05:16:50 am

if u r familiar with php, mysql and drupal you can potentially do this using hooks and custom templates

The simple way of doing this with minimal coding is:

1. Create a custom field of type select that will hold the name of the team. the teams are stored as an option

2. Create 2 event forms. One for folks who will "create" a team. You can add a field (via the _buildForm hook) and then in postProcess add the name of the team to the option group created in step 1

3. the second event form is for folks who want to join a team. you just expose the custom field in step 1

4. if you are good at javascript, you can combine the 2 event forms into 1 by combining steps 2 and 3

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

gvincke

  • Guest
Re: How to create a group during registration to an event ?
August 20, 2009, 07:38:14 am
Thanks lobo.

To keep it simple i want to try to have only one event subscription form to fill.

As eileen told me on your irc channel, i tryed with "employee of " relation. This works fine but then i wanted to personnalise it, i creted a new relation between indivuduals and organisations, but this does not appear as a possible field in profile. The only relation selectable is 'employee of'.

Question:
Why does only "employee of' is selectable as a profile field ?
How does can i do to set up my relation to be selectable in profiles ?

Thanks.
Edit: just to argument, i switched my need from groups to relation, because i discovered that relations can be set regarding to dates. So a contact will be still add to the "driver" group, but in relations, his relations with teams can be setted form special date interval, witch is for us very adapted.

Edit2: maybe i should post this as new post, with a more explicit title, as my question as changed ?
« Last Edit: August 20, 2009, 07:45:57 am by gvincke »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to create a group during registration to an event ?
August 20, 2009, 09:17:41 am

"current employer" was deemed to be a special relationship that we kinda hacked it into the system. It makes a few assumptions (only one current employer at a time etc) and caches things in the contact table for efficiency etc

U will need to use hooks and custom templates to add relationships to your profile

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • How to create a group during registration to an event ?

This forum was archived on 2017-11-26.