g_form.setDisabled('opened_for',false) not working in OnLoad client script

Gudipati Hemala
Tera Contributor

Hi Everyone,

I have a requirement that I need to show 'loading' message on "Opened For" field and make the field disabled/readonly until I get the response from script include.

I have an onLoad client script to do this, PFB.I 'm able show the 'Loading' message, but unable make the field readonly/disabled.

I Also tried with g_form.setReadOnly('opened_for',true), but no luck, Seems that setDisabled & setReadOnly is not functioning on OnLoad client script.

 

function onLoad() {
g_form.setValue('opened_for', '-', getMessage('Loading...'));
g_form.setDisabled('opened_for',true);

//Here I'm calling script include
}

Result is:

find_real_file.png

What I need is like below

find_real_file.png

10 REPLIES 10

yes, both are in Global