New extension for creating relationships durring event registration

Gepubliceerd
2012-07-24 17:02
Written by
SarahGladstone - member of the CiviCRM community - view blog guidelines

I blogged a while ago about "Putting the R back in CRM" about the limits on relationships in the self-service areas.   Well I am happy to have an update.  I  (Pogstone Inc) have sponsored the creation of a new extension ( along with JMA Consulting).  This extension is taking advantage of the CiviCRM extension framework for modules, so it should work under Drupal, Joomla or Word Press.

The extension is designed to enhance event registration for the scenario where a parent is registering their child or children for an event, such as a school program, camp program, or any other youth program. It will allow the collection of data about one or both parents, the children, and several emergancy contacts.  To register multiple children, the standard checkbox "register multiple participants" would be used.  Upon submission, the module will create a household, household member of, parent/child of relationships, spouse of and emergancy contact of relationships between the various contacts.      Standard dedup logic will be used to determine contact matches.

This extension is considered "phase 1" and is geared to this parent/child scenario. Hopefully people can enhance it to cover other common situations like employee of relationships. Many of the details about which relationships to create are stored in a database table, hopefully a UI can be created to administer this table for each event.


The code should be on github by July 25.

Comments

Would we able to set a relationship in backend event setup that wasn't exposed to the entry form, or would this require some work our end?

For example, we run the entry systems for sporting events. It's be great if when a person was entering a team of cyclists into one of our cycling events that the relationship of "Team mate" would automatically be created.

 

You would need to use PhpMyAdmin (or similar tool) to update the configuration table to use the "team mate" relationship.

So far the big limitation has been in the schema - the "registered by" participant field is a FK to another participant ID, not a contact ID. This effectively prevents you from registering someone else without registering yourself for the same event. Sorry mom, you have to go to camp too!

Hi Owen,

JMA Consulting implemented this for Pogstone with a design that will allow any number of contacts and relationships between them to be specified (see http://wiki.civicrm.org/confluence/display/CRM/Enhanced+Event+Registration+Extension).

Currently there is no UI for specifying other sets of contacts and relationships, which is part of a currently unfunded phase 2. However, anyone comfortable in MySQL should be able to set up records in the extension's custom tables for this and the code should handle it. Well, there may need to be a tweak or two to ensure that it is generalized a bit more from Sarah's use case (eg we are doing special processing for second parent contact to determine if they should get a spouse of relationship and a is member of household relationship).

The Extension will posted shortly at https://github.com/JMAConsulting/biz.jmaconsulting.module.EnhancedEventReg.

Anonymous (niet gecontroleerd)
2012-10-08 - 11:30

I was thrilled to learn about this extension after trying to work a similar arrangement over several days.

I am using Wordpress, and did have some trouble with the live links, however -- though this may be a problem with any extension and not specific to this one.

Whenever a live link was clicked on, it would generate an Internal Server error 500. The reason for this was because the plugin code was firing before some of the wordpress code. The fix was to place the following line at the top of both php files:
include_once(ABSPATH . 'wp-includes/pluggable.php');

Thanks for a great extension!

Anonymous (niet gecontroleerd)
2012-10-08 - 11:38

Oh, I did have one question. I do see all all the parent and guardian profiles listed, but how do I gain access to the Child profiles in order to add information? I would like to add Birth Date/Gender and possibly Height/Weight fields

Any help appreciated! Thanks

Hi,

This plugin looks great and I really want to use it for a childrens Play charity.

I have just installed it and am struggling, however, as i can't understand how to get it to create the relationships. I'm not sure if it's just not working or if I have to enter something into the database tables.

The children are created and entered into the event as participants, but no household/relationships etc.

I can't see any references to the civicrm_event_enhanced_relationship table in the code (other than in install and un-install scripts when it's created/dropped) - it also seems empty, and I can't tell where i should place anything (if indeed I should!)

Please forgive any ignorance, as I'm starting out and so may be asking silly questions, but could you point me in a good direction to create the relationships, households etc?

I'm using wordpress, so am reliant on the "standalone-ness" of the plugin, and am using civicrm 4.3.5.

Thanks for the "story so far" though, and hoping to understand more,

Marsh

 

Hi,

This plugin looks great and I really want to use it for a childrens Play charity.

I have just installed it and am struggling, however, as i can't understand how to get it to create the relationships. I'm not sure if it's just not working or if I have to enter something into the database tables.

The children are created and entered into the event as participants, but no household/relationships etc.

I can't see any references to the civicrm_event_enhanced_relationship table in the code (other than in install and un-install scripts when it's created/dropped) - it also seems empty, and I can't tell where i should place anything (if indeed I should!)

Please forgive any ignorance, as I'm starting out and so may be asking silly questions, but could you point me in a good direction to create the relationships, households etc?

I'm using:
wordpress (so pleased with the "standalone")
civi 4.3.5

Thanks in advance for any help,

Marsh