how to make fields ''ReadOnly'' in client script onSubmit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2017 12:52 AM
how to make field
how to make fields ''ReadOnly'' in client script onSubmit.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2017 01:35 AM
Hi Kishore,
if(g_form.getValue('fieldname')=='')
{
g_form.setMandatory('fieldname',true);
alert('please fill the mandatory field')
return false;
}
By using the above format we check and then through alert using onsubmit client script.
Like or Mark correct based on the impact of the response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2017 01:39 AM
Hello Kishore,
May I know your requirement, what is the use case to make the field readonly during OnSubmit. You can acheive the same using UI policies in a very simple way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2020 10:16 AM
Not sure if this is the proper way to piggy back on a question - but I am also interested in making fields readonly onsubmit (after order is placed, fields shouldn't be editable).
vinothkumar - can you share the simple way using ui policies you mentioned.