Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Making HTML variable read-only still shows the editor bar and large text box - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Making HTML variable read-only still shows the editor bar and large text box
KB0596688

Making HTML variable read-only still shows the editor bar and large text box


8497 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Since Geneva UI16, the editor bar and large text box remain even when the variable is read-only. This is different than other versions, where the editor bar is hidden and the box is made smaller to only fit the text that is needed.

Steps to Reproduce

  1. Create a new catalog item.
  2. Create a variable for the catalog item:
    • Type: HTML
    • Question: HTML Box
    • Name: my_html
    • Default Value: Sample Text Here
  3. Create a Catalog UI policy:
    • Applies to: A Catalog Item
    • Short Description: Hide HTML
    • Catalog Item: [Search for and select the item you created in step 1]
    • Catalog Conditions:
      Applies on a Catalog Item view | is | true
      [AND]
      Applies on Catalog Tasks | is | true
      [AND]

      Applies on Requested Items | is | true
    • Save the form.
  4. In this Catalog UI policy, scroll to the Related Links section and create a new Catalog UI Policy Action:
    • Variable Name: my_html
    • Read only: True
  5. Go through the Service Catalog and try ordering the item. 
    Note that on the cat_item_view page, the box is made smaller, and the HTML editor is not showing.
  6. Repeat steps 1-5 on a Geneva instance (or export/import the Catalog Item, Variable, UI Policy, and UI Policy Action records).
    Note that although the variable is read-only, you see a large text box and the HTML editor is displayed on the cat_item_view page.

Workaround

This behaviour is by design. There are two methods for making an HTML variable read-only in Service Catalog:

  1. Have HTML field read-only (the editor controls are still visible, but disabled).

    Use a UI Policy or Client Script on the html variable.





  2. Have HTML field read-only as a text area without editor control.

    Update the WRITE ROLES and CREATE ROLES on HTML variable with a role like nobody or admin.



Related Problem: PRB653425

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.