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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Event Registration Camper and Parent & Create Relationship
Pages: [1]

Author Topic: Event Registration Camper and Parent & Create Relationship  (Read 1102 times)

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Event Registration Camper and Parent & Create Relationship
February 02, 2011, 12:59:40 pm
I am trying to setup CiviEvent to capture both camper and parent information.  When they enter both of their information I would love for it to create a Parent contact and a student contact and create the Child of relationship between the two.  Is there an easy way to do this?

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: Event Registration Camper and Parent & Create Relationship
February 02, 2011, 01:23:00 pm

You will need to this via hooks and customized templates.

Basically inject the parent or child field (depends on who has more info) in the buildForm hook, and then save them in the postProcess hook and create a relationship

this comes up often enough, that would be great if you can write a drupal module / joomla hooks that automate a large part of this

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

zesgar

  • I post occasionally
  • **
  • Posts: 107
  • Karma: 2
  • CiviCRM version: 4.3.4
  • CMS version: Joomla 2.5
Re: Event Registration Camper and Parent & Create Relationship
February 08, 2011, 09:27:55 am
Do I use the custom profiles included in the event registration page or will I have to custom put those in?

I am looking around for some sample coding any leads to any other posts?

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: Event Registration Camper and Parent & Create Relationship
February 08, 2011, 11:22:03 am
i suspect you would need to inject those fields into the form directly and not use profiles

check:

http://svn.civicrm.org/tools/trunk/drupal/modules/civicrm_regsite/

which basically implements this form:

http://civicrm.org/civicrm/profile/create?reset=1&gid=15

which connects and individual to an org and sets the right permissions etc

Might also want to check:

http://forum.civicrm.org/index.php/topic,18478.msg76912.html#msg76912

and potentially collaborate with a few other folks to solve this issue

lobo
« Last Edit: February 08, 2011, 11:23:49 am by Donald 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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Event Registration Camper and Parent & Create Relationship

This forum was archived on 2017-11-26.