setReadonly to false

Ak8977
Tera Expert

there was a variable called xyz in variable set. It was set to readonly through UI policy in variable set.

Now i need to make it editable for a single catalog item . so I created the following client script. But still the variable was in readonly state. Could anyone help me how I can make the variable as editable.
thanks,

function onLoad() {
   //Type appropriate comment here, and begin script below
   g_form.setReadOnly('xyz',false);
}
1 REPLY 1

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Ui policies run after Client scripts, so if you try to make the variable editable in a client script it wont work as the ui policy would override it.

You need to make the change in the UI Policy itself.

-Anurag