I have a webform where there are conditional elements that are reliant on the user being a bona fide affiliate of our organisation. Both Anonymous and Authenticated users can use this form.
I currently have it using the CiviCRM elements to look for an existing contact in order to fulfill the conditional; however we have found that if we have had contact with the user (ie they previously were bona fide, or have submitted other forms in the past) then the conditional is fulfilled.
(Yes, that is kind of obvious.... we overlooked it)
I think I have three options;
- Have a webform field, hidden, pertaining to the user role. this can then be used as a conditional.
- Use a Workflow Rule to redirect users with particular roles to a different, but identical, webform. Then I would have two webforms each witht eh appropriate elements.
- Completely remove the connection to CiviCRM for the webform and rely on our staff to filter the wheat from the chaff.
Option 1 is probably the most logical solution in my mind, but I can not find a way to poll Drupal for the user role.