Check box field (checked to true) is read - only after the form is saved

Sunayana4
Tera Contributor
I have a check box field where it should be read only (checked true) after the form is saved I tried writing a UI policy when check box is true, it is read - only. But this is the requirement - after enabling (after saving) this option once, field has to become non editable to not disabled it in the future
1 ACCEPTED SOLUTION

Is this a Request users can submit or an Incident?  Making a checkbox on a form read only when checked is going to prevent them from unchecking it prior to submitting/saving the record.  

 

If you are making it read only after it is checked...The UI Policy is doing what it is designed to do.  Now, if you only want it read only after they are finished and submitted or saved then you may want to change to a Client Script.  

 

Use an onSubmit client script and use the g_form.setReadOnly('checkbox_variable_name') to make it read only AFTER it's submitted versus while they are still using the form.


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

View solution in original post

3 REPLIES 3

Steven Parker
Giga Sage

Which form is this built on?

 

Can you provide a screenshot?


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Sunayana4
Tera Contributor

Hi @Steven Parker , Please refer this screenshot

Sunayana4_0-1683293010953.png

Thanks & Regards,

Sunayana

Is this a Request users can submit or an Incident?  Making a checkbox on a form read only when checked is going to prevent them from unchecking it prior to submitting/saving the record.  

 

If you are making it read only after it is checked...The UI Policy is doing what it is designed to do.  Now, if you only want it read only after they are finished and submitted or saved then you may want to change to a Client Script.  

 

Use an onSubmit client script and use the g_form.setReadOnly('checkbox_variable_name') to make it read only AFTER it's submitted versus while they are still using the form.


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven