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 »
  • Webform and multiple organisation sub contact types
Pages: [1]

Author Topic: Webform and multiple organisation sub contact types  (Read 330 times)

Dave Gray

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.5..8
  • CMS version: Drupal 7
  • MySQL version: 5.5.42-37.1
  • PHP version: 5.4.17
Webform and multiple organisation sub contact types
March 26, 2015, 12:37:33 pm
Hi all,

Thought I would post my question here after quite a lot fruitless searching.

I have a webform to enter or edit organisational contacts.  I have three different types of organisation contact sub type. 'Services', 'Settings' and 'Affiliated members'.  An organisation could in theory be any, or all three of the different types.

In Civi I have custom fieldsets and custom fields set up for each contact type. These work nicely when entering contact data in the Civi backend. Upon selecting the specific contact sub type the custom fields are then shown.

Can I get a Webform to do the same?

In the CiviCRM tab I've set 'Type of organisation (contact type)' to be 'User select'.  I want staff to be able to select what type of organisation contact they are creating.

However if the option is set as 'User select' then I don’t have any access to the custom fields for each of the specific contact types, just the basic organisation fields.  I can only see and enable custom fields per contact type when I select that contact type.

The only way I can see to make all these fields available to add to the Webform is to pre select all of the contact types.  This however would automatically give all three contact types to organisations which is not what I want.

Has anybody got any ideas or am I trying to do the impossible ???

Many thanks

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Webform and multiple organisation sub contact types
March 26, 2015, 12:47:44 pm
As you've noted, on-the-fly fetching of contact-type specific custom fields happens on the back-end, but hasn't been implemented for front-end webforms.
What you're asking isn't impossible but hasn't been implemented yet. Here are 2 ways we could do it:
  • Minimal (~1 hr developer time): Show all custom fields on the backend when the contact type is "user select". It'll be up to you to set-up conditional rules on your webform to ensure the right fields are shown when appropriate.
  • Better (~10 hrs): Show all custom fields on the backend when the contact type is "user select". Automatically create the conditional rules for you.
Are you up for sponsoring either of those improvements? I'd be really excited to get sponsorship for the better fix, but if that's out of your reach at least we could do the minimal one.
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 »
  • Webform and multiple organisation sub contact types

This forum was archived on 2017-11-26.