Make all form fields read-only (client script)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2011 11:49 PM
Hi,
I need to put all the fields of a form read-only. I need to use a client script for that, because in certain case I will need to have some fields editable.
Is there another way than put all the fields in a ui policy (or a client script)?
Is suppose there is a way to do such a thing :
get references to all fields of the form
while(...)
{
referenced field.setreadOnly()
}
Thanks a lot
rgds
Xavier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2024 05:26 AM - edited ‎01-12-2024 05:26 AM
Any reason to do it on client script and not ACL?
ACL would lock the fields from all UI (portal/native/mobile)and even on the list view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2024 06:57 AM - edited ‎12-03-2024 06:58 AM
For multiple fields or specific use cases, a Client Script might be easier to implement than an ACL. But ACL would also be the more secure option as it runs on the server. Client Scripts and UI Policies can technically be disabled through the browser developer tools.