How to make certain fields read only after submitting (save) the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2018 10:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2018 11:19 AM
Write an Onload Client Script something like below
// Check if its not a new record, basically you are checking if you already saved it
if(!g_form.isNewRecord())
{
//***Change the column names [1st parameter] as per your needs****//
g_form.setReadOnly('user', true);
g_form.setReadOnly('description', true);
g_form.setReadOnly('return_type', true);
g_form.setReadOnly('to', true);
g_form.setReadOnly('from', true);
}
Thank you,
Aman Gurram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2020 08:34 AM
This does assume that he meant this should apply to new records only.
The only way I've found to apply the same sort of restriction on an already existing record is via a 'write' ACL on the table/field. The ACL won't apply until the condition is met after the record is saved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2019 04:07 AM
Aman's reply is correct regarding the client script. Meantime please be aware and make sure you know the difference between a CS and a UI Policy. Link here difference between a Client script and an UI policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2019 04:14 PM - edited 03-26-2025 05:24 PM
I am a beginner and I would like to know the difference between the CS and the policies interfaces. Thanks for the article.
