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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Letting contacts choose their relationship type in a form during sign-up
Pages: [1]

Author Topic: Letting contacts choose their relationship type in a form during sign-up  (Read 894 times)

corey

  • Guest
Letting contacts choose their relationship type in a form during sign-up
March 19, 2009, 03:52:44 pm
First off, CiviCRM is phenomenal! Thanks to those involved in the project, you're doing an amazing job!

We deal with students and we need to know which university they're from. So in our sign-up form (a profile) I need to let them choose from a Selection (drop-down field) which uni they go to. This needs to create a relationship between the new student and the school they chose.

Is this possible? How? If not, how else should I create a link between an Org (the schools) are an Individual (students)?

Also, I read that mixing Contact fields and Individual fields will not work in profiles/forms... is this still true?

Thanks for any help!

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: Letting contacts choose their relationship type in a form during sign-up
March 19, 2009, 05:07:06 pm
1. Exposing relationships via profiles is not available in 2.2 and prior (and probably not in 2.3 either). This has been coming up a bit more frequently, so if you can step up and help write the code and/or sponsor the development that will help you and the community :)

2. If you are savvy with PHP and mysql, you can potentially do this using a hook (http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmcustomFieldOptions) and a custom cron job using the api to create the relationship. If you need more details or help, contact us on IRC (http://embed.mibbit.com/?server=irc.freenode.net&channel=%23civicrm&forcePrompt=true)

3. An Individual is a Contact, so you can mix those fields. You cannot mix an Individual and Organization fields (or Contribution and Participant)

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

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Letting contacts choose their relationship type in a form during sign-up
March 20, 2009, 02:00:45 pm
Are you using 'employer of' relationship? If not maybe you could just re=think Current Employer as University attended - then you can get them to fill in 'current employer' field (renamed of course) and have them select the name from the list, then that will create relationship for you (I think)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

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: Letting contacts choose their relationship type in a form during sign-up
March 20, 2009, 02:15:32 pm

the minor issue with using current employer is that ALL organizations are exposed which may or may not be true in your case (i.e. there might be other orgs in the DB that are not universities)

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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Letting contacts choose their relationship type in a form during sign-up

This forum was archived on 2017-11-26.