How to set variables field both as mandatory and readonly

Shweta Kasbe1
Tera Contributor

How to set variables field both as mandatory and readonly.

1 ACCEPTED SOLUTION

Rekha Esadkar
Tera Expert

Hi Shweta,

 

You can do this using ui policy (if service catalog then catalog ui policy)But It will set only mandatory variable not readonly.But their is no point to make both readonly and mandatory at once.

I applied to one variable please check SS

find_real_file.png

and the result is 

find_real_file.pngIIf my answer helped you in any way, please then mark it as helpful.

View solution in original post

6 REPLIES 6

I agree with Mark, though, I would like to know the functional case. By selecting both mandatory and read-only, you are telling the end user:

  • If the field is empty, you MUST enter a value to proceed.
  • You ARE NOT ALLOWED to enter a value.

At this point the user throws their laptop out the window.

find_real_file.png

Easy, a quick way to add a marker to indicate a field is correct or something.

So a quick check on field and update a checkbox (read only, mandatory and hidden) to be true to allow the form to submit, or false and not.

Why, a single onChange script to show immediate feedback and saves writing an onSubmit

I can think of other ways around this issue, but that is a quick n dirty reason