I am trying to make a reference field mandatory and read-only at same time.

Taaha M
Tera Contributor

When I am trying to make a field  (type- reference) mandatory and read-only, I am not able to do it. It is only possible if I change the mandatory action to leave alone.

Never I have seen this behaviour, why is it not working.

The below screenshots shows how the field is read-only when mandatory is 'leave alone'.

TaahaM_0-1732770904183.png 

TaahaM_0-1732770963607.png

The below screenshots for mandatory changed to true in UI policy action.

TaahaM_1-1732771050939.pngTaahaM_2-1732771120077.png

 

 

 

 

1 ACCEPTED SOLUTION

Making a field mandatory means the user must select or enter a value before submitting the form. However, if the value is automatically populated based on another field, making the field read-only is sufficient. In this case, marking the field as mandatory doesn't make sense, as the value is pre-filled and cannot be changed by the user. Setting it to read-only ensures the value remains fixed and cannot be modified.

 

 

 

 

View solution in original post

7 REPLIES 7

Then just make it read-only why to make mandatory as value is populated on field.

 

 

So we cannot have mandatory field if we are having read-only action, even if it is auto-populating.

Making a field mandatory means the user must select or enter a value before submitting the form. However, if the value is automatically populated based on another field, making the field read-only is sufficient. In this case, marking the field as mandatory doesn't make sense, as the value is pre-filled and cannot be changed by the user. Setting it to read-only ensures the value remains fixed and cannot be modified.