
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 05:23 AM
Heya, wondering if anyone has come across this before?
If I set allow_references=true on a field with the type "Field Name", it seems to force that field to be mandatory on the Form:
Weirdly, in such a way that it looks like there is a value, even if one has not yet been selected (or in this case even available as the dependant field that contains the table name is not completed):
This is problematic for me as this field is hidden by UI Policy, but when it becomes mandatory it forces the field to appear on the form.
It's definitely the attribute, as I remove can remove it, and the field goes back to behaving!
Does anyone know if this is the intended behaviour? Or any ideas for a work-around?
Thanks,
Graeme
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 05:38 AM
You could write a client script onLoad that does g_form.setMandatory('fieldname', false);
function onLoad() {
g_form.setMandatory('field', false);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 05:38 AM
You could write a client script onLoad that does g_form.setMandatory('fieldname', false);
function onLoad() {
g_form.setMandatory('field', false);
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2018 06:02 AM
Thanks! That worked perfectly 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2021 11:15 AM
I actually just ran into this problem myself, and the
g_form.setMandatory("FIELD_NAME", false);
Solution does not work as intended. However, if you add one more attribute property,
allow_null=true
Then the Field Name field will no longer be mandatory.
The instance version I did this on was, Paris. I assume this works on other versions as well.