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 CiviEvent (Moderator: Yashodha Chaku) »
  • setting up custom fields per role
Pages: [1]

Author Topic: setting up custom fields per role  (Read 993 times)

civicrmsav

  • I post frequently
  • ***
  • Posts: 121
  • Karma: 5
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.x
setting up custom fields per role
April 21, 2012, 08:55:00 pm
Hi -

CiviEvent is not working as I expected, and I'm wondering if I'm doing something wrong or just misunderstanding the expected behavior.

My event has three roles - a person registering for a role needs to see only custom fields specific to that role.

Here's what I did:
  • I created a profile ("choose role") and included the field "Participant Role"
  • I created a custom field set ("vendor only") and set it to apply to Participants (Role) = Vendor.  I added the fields I need for vendors, and then created a corresponding profile ("vendor only profile")
  • I created my event and used the "choose role" profile at top and the "vendor only profile" at the bottom. 

I expected that, the vendor only profile fields would show only when the chosen role was "vendor", but the fields show no matter which role I choose.  In fact, if I drop the "choose role" profile and just set the role as part of the event, it also seems to  have no impact on whether the "vendor only" fields show.

Any suggestions?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: setting up custom fields per role
April 21, 2012, 11:27:07 pm
I do not think any such feature exists for CiviCRM. You could custom code this hiding/showing of fields using jQuery however.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

civicrmsav

  • I post frequently
  • ***
  • Posts: 121
  • Karma: 5
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.x
Re: setting up custom fields per role
April 22, 2012, 01:13:41 pm
Thank you for the response.   If this isn't how it's supposed to work, does anyone know how a profile connected to Participant (Role) *is* supposed to work?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: setting up custom fields per role
April 22, 2012, 01:17:02 pm
When you create an event you can assign the Participant Role. Thus you determine which profile will be used, for all registrants.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

civicrmsav

  • I post frequently
  • ***
  • Posts: 121
  • Karma: 5
  • CiviCRM version: 4.2.6
  • CMS version: Drupal 7.x
Re: setting up custom fields per role
April 22, 2012, 07:57:45 pm
Thank you again for making time to answer my question.  I must still be missing something.

To test what you suggested, I set the participant role for the entire event to "vendor",  and used my "vendor only" profile  on the "online registration" section.   (That profile contains fields from a custom fieldset where the used for setting is Participants (Role) = Vendor.)  As expected the fields and profile showed.

But if I changed the participant role to "attendee", the "vendor only" profile and fields still showed.   This seems unexpected to me, since the fields in the profile are only for Participants (Role) = Vendor.

I also tried leaving the profile off, to see if setting the participant role for the entire event to "vendor" would cause the profile to be pulled up automatically, but it was not.

This is sort of academic, I will follow your jquery suggestion to show and hide fields, but I'm struggling to understand why the "used for Participants (Role) = Vendor" option exists since I can't see any action that CiviEvent is taking in response to that setting.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • setting up custom fields per role

This forum was archived on 2017-11-26.