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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Student to school relationship
Pages: [1]

Author Topic: Student to school relationship  (Read 445 times)

stevegjacobs

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Joomla
Student to school relationship
February 26, 2014, 11:57:33 am
Hi
Here is the scenario: We are using Joomla/Civicrm. We have imported 1600 schools as organisation contacts. We have worked out a way for a Joomla front-end user to create new users who are students. We need to find a way to more or less automatically associate them with the school. We were planning on using the employee/employer relationship. When editing the student profile in the back end of civicrm, the 'Current Employer' field has a search facility that searches the existing organisation contacts as soon as you start to type. Can this be implemented in a Joomla front end profile/form?

Thanks in advance for any tips.
Steve Jacobs

The smallest act of kindness is worth more than the grandest intention.
Oscar Wilde

hsaca

  • I post occasionally
  • **
  • Posts: 32
  • Karma: -1
    • Hot Springs Area Cultrual Alliance
  • CiviCRM version: 4.5.4
  • CMS version: WP-4.0
  • MySQL version: 5.5.37
  • PHP version: 5.6.0
Re: Student to school relationship
January 24, 2015, 09:19:33 am
I want this too in WordPress !!!!!!

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Student to school relationship
January 24, 2015, 10:02:24 am
There's a way to do this, but it involves either a) writing some custom code, or b) not using relationships.  You can create a custom field of type "Contact Reference", limit it to schools, and give anonymous users access to contact reference fields.

You can either:
* Stop there, and use the contact reference field instead of the relationship to associate your students with the schools.  This actually works pretty well.
* If for whatever reason you also want the relationship, you can write a small CiviCRM extension based on hook_civicrm_custom such that whenever a that field receives a value, it automatically generates a relationship.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Student to school relationship

This forum was archived on 2017-11-26.