issues making a variable mandatory AND read-only

jana_jank
Tera Contributor

Hi all, 

 

We have a set of questions (as variables) in a catalog item which have to be processed by a widget, this is just a business requirement so I cannot change it.

I want to add a new question that is mandatory, but also hidden or read only. The question will be automatically filled in from the widget based on some of the previous answers. 

I have tried UI policies, client scripts, dictionary settings and adding code within the widget itself. But it seems like when a field is set to mandatory, neither of the other options (hidden or read-only) is possible. Does someone know of a way to by-pass this settings?

Or some other creative ideas to get around whatever is blocking the hidden or read-only properties?

 

Looking forward to your answers.

Thanks!

3 REPLIES 3

Brian Lancaster
Tera Sage

A mandatory field cannot be hidden or read only. If the question will automatically be filled in there should be no reason to make it mandatory.

Hi Brian,

 

Thanks for the reply.

 

The issue arises before the previous questions are answered, so the new question will be empty, mandatory, and users have the chance to fill it in themselves, which we don't want. We don't want the users to be able to manipulate this field. It is like a fall back plan for the previous questions, to make sure that all of those are answered. That's why we want to make the field read only as well, so that users cannot manipulate it.

Any ideas for this scenario?

 

You cannot do that. You can make it read only once it is filled in but it cannot be mandatory. You can use a script or UI Policy to change the field from mandatory to read only but if you have the checkbox for mandatory on the variable check then you will need to uncheck that and use a client script or ui policies.