- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:11 AM
I want to know whether there is any way to make multiple fields readonly together without using Client Script.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:22 AM
Hi @akhileshv ,
There is no other way apart from script(client) where u can add code to make all field read-only/mandatory.
Else UI policy which is sometimes pain.
Thanks,
Danish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:27 AM
No, not possible to select more than one field, however you can try below code in UI policy script to see if it makes all fields read only based on condition , otherwise you have to settle for Client script. you can do this with ACL as well as that's the most preferred way of doing it.
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
Regards,
Musab

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:27 AM
No, not possible to select more than one field, however you can try below code in UI policy script to see if it makes all fields read only based on condition , otherwise you have to settle for Client script. you can do this with ACL as well as that's the most preferred way of doing it.
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
g_form.setReadOnly(fields[x], true);
}
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2024 10:22 AM
Hi @akhileshv ,
There is no other way apart from script(client) where u can add code to make all field read-only/mandatory.
Else UI policy which is sometimes pain.
Thanks,
Danish