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
‎12-20-2016 09:31 AM
Then You can better go with UI policy and specify those fields in related list under UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2015 03:13 PM
In Fuji patch 4 (at least), g_form.getEditableFields() does not return currency fields. So, after using the snipped to set the other fields readOnly, I had to manually specify the currency fields.
I opened an incident with HI to report this but HI says that g_form.getEditableFields() is not documented / supported.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2016 02:32 AM
awesome man thats slick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2016 04:39 AM
Hi Simon, This has been very helpful.. Many Thanks, Rachana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2017 10:48 PM
Hi Simon,
I found that it is not working in mobile view. So it would give a problem while you are making the form same as desktop view.
can you please let me know if you have any script that can work for both mobile and desktop view for making all fields on the form readonly.
Thanks in advance!!