Body: <p>I am creating a webform and I want the user to first select a region and then, depending on their answer, to select from a list of organisations of a particular contact type in that region. Their selection then populates a hidden email field so that the form submission can be sent to that email address. The idea is that this avoids having to manually update the list of groups and notification settings every time a new group comes into existence or a group contact changes.</p>
  <p>However, when I go to set up a conditional eg. if region 'East' is selected, contact 4 is shown with a select list of existing contacts of that contact type, tagged 'East', it says that this is an 'illegal action' and does not allow me to do it. I have tried making the conditional point to a particular field set with the contact select field within that but that doesn't work - it seems to be an issue with the type of field.</p>
  <p>Is this impossible or is there a way around it?</p>
  <p>Thank you!!</p>
  <p>Edit: Drupal version 7.80, CiviCRM version 5.36.1, Webform CiviCRM integration version 7.x-5.5 (Webform version 7.x-4.23)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-10T20:18:06.217Z
Comments.Text: Hi Joanna, there is a lot of development going on with webform_civicrm so it will help folk help you if you update the above with your Drupal version, civi version and webform_civicrm version
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-03T08:27:22.133Z
Comments.Text: I had a similar issue, and I am on the same version of Drupal and Civi as you.  It looks like if you set the form to formally have a 'Contact' you need to populate the fields one way or another, it cannot be conditional.  I wanted to create a contact if the person filling in the form did not also perform another role - I could not say 'are you the person performing this role?' and then if the answer was 'Yes' not prefil the contact.  There does not seem to be an easy way of saying Contact 1 = Contact 2 if... I'll let you know how I get around it, if I do!
Comments.UserDisplayName: ChumKui
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-05T08:57:34.180Z
Comments.Text: I think there may be an issue - I found that if I persisted on clicking Save, the 'illegal' message went away after a few tries.  give it a go, you never know.  Need to upgrade to Drupal 9 and start using the latest platform...
Comments.UserDisplayName: ChumKui
Tags: <webform-civicrm>
Title: Setting up conditional in a webform using an 'Existing Contact' select list field
ThreadText: # Setting up conditional in a webform using an 'Existing Contact' select list field
  
  (Asked by: username_0 on 2021-06-10)
  
  I am creating a webform and I want the user to first select a region and then, depending on their answer, to select from a list of organisations of a particular contact type in that region. Their selection then populates a hidden email field so that the form submission can be sent to that email address. The idea is that this avoids having to manually update the list of groups and notification settings every time a new group comes into existence or a group contact changes.
  
  However, when I go to set up a conditional eg. if region 'East' is selected, contact 4 is shown with a select list of existing contacts of that contact type, tagged 'East', it says that this is an 'illegal action' and does not allow me to do it. I have tried making the conditional point to a particular field set with the contact select field within that but that doesn't work - it seems to be an issue with the type of field.
  
  Is this impossible or is there a way around it?
  
  Thank you!!
  
  Edit: Drupal version 7.80, CiviCRM version 5.36.1, Webform CiviCRM integration version 7.x-5.5 (Webform version 7.x-4.23)
  
  **Tags:** webform-civicrm
  
  > **Comments:**
  > **username_1**: Hi Joanna, there is a lot of development going on with webform_civicrm so it will help folk help you if you update the above with your Drupal version, civi version and webform_civicrm version  
  > **username_2**: I had a similar issue, and I am on the same version of Drupal and Civi as you.  It looks like if you set the form to formally have a 'Contact' you need to populate the fields one way or another, it cannot be conditional.  I wanted to create a contact if the person filling in the form did not also perform another role - I could not say 'are you the person performing this role?' and then if the answer was 'Yes' not prefil the contact.  There does not seem to be an easy way of saying Contact 1 = Contact 2 if... I'll let you know how I get around it, if I do!  
  > **username_2**: I think there may be an issue - I found that if I persisted on clicking Save, the 'illegal' message went away after a few tries.  give it a go, you never know.  Need to upgrade to Drupal 9 and start using the latest platform...  
  
  ---
  
  ## 0 answers
  
  