- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 11:33 AM
Hi Community Folks,
I have a catalog form with 10 reference fields(from sys_user), I am using a script include a client script to get value based on the selected users, Now if 5 fields have data then have to be read-only and 5 fields doesn't have data, they have to be editable.
We have taken this approach because, user are editing the auto populated data, we don't want them to edit that. Is there a way I can do?
TIA
Solved! Go to Solution.
- Labels:
-
Multiple Versions
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 11:40 AM
Hey,
If you are using client script to autopopulate, why don't you include a check in the same to check if the response for a particular field is not empty, then set the value and also make it read only.
for eg:
if(answer != ''){
g_form("field_name", answer);
g_form.setReadOnly("field_name", true);
}
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 11:40 AM
Hey,
If you are using client script to autopopulate, why don't you include a check in the same to check if the response for a particular field is not empty, then set the value and also make it read only.
for eg:
if(answer != ''){
g_form("field_name", answer);
g_form.setReadOnly("field_name", true);
}
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2022 11:44 AM
Hi ,
Please refer to this
Making a reference variable in Service Catalog read only.
Mark Correct or Helpful if it helps.
***Mark Correct or Helpful if it helps.***