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 Drupal Modules »
  • Drupal Webform Integration »
  • Mixing a new contact and an existing one
Pages: [1]

Author Topic: Mixing a new contact and an existing one  (Read 329 times)

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Mixing a new contact and an existing one
December 15, 2014, 10:06:53 am
My use case is very topical... social workers are completing names of children (up to 5 per form) who will receive Christmas presents.  So the first contact on the form is the social worker (existing contact) , and the next 5 contacts are the children (new contacts).  This has all worked very well this year.  Now my client wants to add, for each child, the name of a second social worker which would be autocompleted (the second social worker could be any of the ones in the social worker group).   So for each child I am wanting the webform to create a new contact (the child) and also output a reference to an existing contact.  I don't see that this can be done in webform... am I right?
Andy Clark

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Mixing a new contact and an existing one
December 15, 2014, 02:40:50 pm
It can be done and shouldn't be too hard. It would be more convenient for you to set up if it was the same 2nd worker for all 5 kids. In that case just create one more webform contact, set it up as just an autocomplete "existing contact" field, and then add the 5 relationships.
If it's potentially a different worker for each kid, then you just have to do the above 5 times.
Try asking your question on the new CiviCRM help site.

clarkac

  • Administrator
  • Ask me questions
  • *****
  • Posts: 399
  • Karma: 11
  • CiviCRM version: 4.4.11 & 4.5.5
  • CMS version: Drupal 7
  • MySQL version: 5.1.61-cll
  • PHP version: 5.3.27
Re: Mixing a new contact and an existing one
December 17, 2014, 07:16:29 am
Thanks, Coleman, got this working!
Andy Clark

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Mixing a new contact and an existing one
December 17, 2014, 07:45:26 am
Glad to hear it. One more tip (which you may have already thought of). This module will add a fieldset around each of the new worker contacts you've added. But you don't really need those. You can improve the visual organization of the form by moving the autocomplete field for each worker into the fieldset of their respective kid.
You can also improve your mental organization by taking advantage of the "contact label" field on the back-end (civicrm tab) to give each worker a label like "worker for child 1" etc.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Drupal Webform Integration »
  • Mixing a new contact and an existing one

This forum was archived on 2017-11-26.