Catalog form to be read-only after submitting

Ankit49
Kilo Contributor

Dear Folks,

 

We want to make all the variables of the form as read only after submitting the service.

 

Please help me to achieve the same.

 

thanks & Regards,

Ankit Kumar

1 ACCEPTED SOLUTION

Sindhu B1
Giga Expert

Hello ,

 

You can use catalog ui policy  to make variable read only  and also you can use client  script 

code:

g_form.setVariablesReadOnly(true);

find_real_file.pngPlease mark it as correct or like  if it correct

 

Regards ,

Sindhu B

 

 

View solution in original post

6 REPLIES 6

Kalaiarasan Pus
Giga Sage

This is an undocumented function but we use this to set all the variables to readonly -   g_form.setVariablesReadOnly(true);

Kalaiarasan Pus
Giga Sage

I am not sure if that works on portal but if that doesn't, then this link should help you

https://community.servicenow.com/community?id=community_question&sys_id=47204761db98dbc01dcaf3231f9619c3

Ankit49
Kilo Contributor

Is there any generic option which we can enable for all the maintain items, so that every service forms will be read only after we submitted the request.

 

Thanks & regards,

Ankit

Sindhu B1
Giga Expert

Hello ,

 

You can use catalog ui policy  to make variable read only  and also you can use client  script 

code:

g_form.setVariablesReadOnly(true);

find_real_file.pngPlease mark it as correct or like  if it correct

 

Regards ,

Sindhu B