how to make fields ''ReadOnly'' in client script onSubmit.

Kishore8
Kilo Guru

how to make field

how to make fields ''ReadOnly''   in client script onSubmit.

7 REPLIES 7

Siddartha Gudim
Tera Guru

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.


vinothkumar
Tera Guru

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.


bert francis
Kilo Explorer

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.