Answers.Body: <p>For select option components in a Webform, Disabled is not an option.</p>
  
  <p>For something like what you are trying to do, I might be inclined to add a contextual block view that boldly states that they are not allowed in.</p>
  
  <p>I also might try to set up a rule that checks that field and prints out a warning. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-25T18:30:19.387Z
Answers.Text: Thanks - in Civi I added a 'ban reason' and exposed that as a disabled textfield, with a conditional message if this field is non blank.
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-24T20:26:10.840Z
Answers.LastActivityDate: 2015-10-24T20:26:10.840Z
Answers.UserDisplayName: pmoz
Answers.Body: <p>You could use webform conditional rules to display or hide a message based on the ban.</p>
  
  <ol>
  <li>Add the "is banned" custom field to your webform</li>
  <li>Update it from the webform tab to be type "hidden" (but <em>not</em> secure value)</li>
  <li>Create a "Markup" field, and enter your warning message</li>
  <li>Add a conditional rule to show/hide the markup based on the "is banned" value.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-15T20:33:39.760Z
Answers.Text: The above bug report was closed as 'correct working behaviour'.  Which is a great shame if you want to hide a field and use it in conditional processing.
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-16T15:09:03.267Z
Answers.Text: I've reopened the issue - also note that I discovered a workaround which may suit your needs.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-19T20:05:18.723Z
Answers.Text: Workaround indeed works - I changed the field to 'hidden element' and the conditional now works. Thanks, you are a star, Coleman!
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-02T17:27:43.327Z
Answers.Text: Workaround would be to hide the field with css, but IMO you should file a bug report with the webform project too.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-11-02T18:39:44.900Z
Answers.Text: Done, I raised a bug with the webform project - see https://www.drupal.org/node/2606598
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-26T22:21:04.483Z
Answers.Text: I hadn't realised that I could hide a field in the webform - learning a lot here!  Thanks.
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T09:37:05.467Z
Answers.Text: I set up the 'banned' field as an (alphanumeric) radio button and before I made it hidden I tested it and it worked fine using conditionals.  When I made the field hidden in webform it stopped working - as though the values become inaccessible.  So this doesn't seem to work - guess I should untick it as a solution - unless I'm missing something?
Answers.UserDisplayName: Andy Clark
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T18:20:27.263Z
Answers.Text: Oof, I guess webforms won't use hidden fields as conditional control fields? That sounds like a bug to me.
Answers.UserDisplayName: Coleman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-26T21:47:47.120Z
Answers.LastActivityDate: 2015-11-28T19:17:27.613Z
Answers.LastEditDate: 2015-11-28T19:17:27.613Z
Answers.UserDisplayName: Coleman
Body: <p>I have put together a webform for signing in guests to a Nightshelter. Some guests are banned from time to time,  and when a known guest tries to get signed in I want to show if he/she is subject to a ban. Simple enough, but I can't figure out how to do this without exposing the yes/no banned field as updateable.  I can use conditionals but still end up showing the field as updateable.  Is it possible to show a field as read only in a webform? Or any other suggestions? </p>
  
Tags: <webform-civicrm>
Title: How can I display an info only field in a webform
ThreadText: # How can I display an info only field in a webform
  
  (Asked by: username_0 on 2015-10-24)
  
  I have put together a webform for signing in guests to a Nightshelter. Some guests are banned from time to time, and when a known guest tries to get signed in I want to show if he/she is subject to a ban. Simple enough, but I can't figure out how to do this without exposing the yes/no banned field as updateable. I can use conditionals but still end up showing the field as updateable. Is it possible to show a field as read only in a webform? Or any other suggestions?
  
  **Tags:** webform-civicrm
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-10-26. Score: 4 | Accepted answer
  
  You could use webform conditional rules to display or hide a message based on the ban.
  
  1. Add the "is banned" custom field to your webform
  2. Update it from the webform tab to be type "hidden" (but *not* secure value)
  3. Create a "Markup" field, and enter your warning message
  4. Add a conditional rule to show/hide the markup based on the "is banned" value.
  
  > **Comments:**
  > **username_0**: I hadn't realised that I could hide a field in the webform - learning a lot here!  Thanks.  
  > **username_0**: I set up the 'banned' field as an (alphanumeric) radio button and before I made it hidden I tested it and it worked fine using conditionals.  When I made the field hidden in webform it stopped working - as though the values become inaccessible.  So this doesn't seem to work - guess I should untick it as a solution - unless I'm missing something?  
  > **username_2**: Oof, I guess webforms won't use hidden fields as conditional control fields? That sounds like a bug to me.  
  > **username_2**: Workaround would be to hide the field with css, but IMO you should file a bug report with the webform project too.  
  > **username_0**: Done, I raised a bug with the webform project - see https://www.drupal.org/node/2606598  
  > **username_0**: The above bug report was closed as 'correct working behaviour'.  Which is a great shame if you want to hide a field and use it in conditional processing.  
  > **username_2**: I've reopened the issue - also note that I discovered a workaround which may suit your needs.  
  > **username_0**: Workaround indeed works - I changed the field to 'hidden element' and the conditional now works. Thanks, you are a star, username_2!  
  
  ---
  
  ### Answer by username_1 on 2015-10-24. Score: 2
  
  For select option components in a Webform, Disabled is not an option.
  
  For something like what you are trying to do, I might be inclined to add a contextual block view that boldly states that they are not allowed in.
  
  I also might try to set up a rule that checks that field and prints out a warning.
  
  > **Comments:**
  > **username_0**: Thanks - in Civi I added a 'ban reason' and exposed that as a disabled textfield, with a conditional message if this field is non blank.  
  
  ---
  
  