SimonMorris
ServiceNow Employee
Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
10-14-2011
07:27 AM
Xavier asked on the Community forums "Can I make every field on a form read-only?"
You can! Use a g_form method to enumerate the editable fields on a form, and then iterate through them, setting them as read-only.
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
- 12,674 Views
10 Comments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.