Hi all,
could you help me, currently i working on an entity form...like this
Chiller available : yes || no <-- visible (default no)
Cold : yes || no <-- disable
Lightning : yes || no <-- disable
what i want is, when i check the chiller available into yes, the cold and lightning field enable (visible)
i have write a script like this :
var FORM_TYPE_CREATE = 1;
var formType = Mobile.Page.ui.getFormType();
var cekData = "";
var cekDataSave = "";
function setDisabledForm()
{
var controls = Mobile.Page.ui.controls.get();
var cekcontrols = Mobile.Page.ui.controls.get('ttr_chilleravailable');
for (var i in controls) {
var control = controls[i];
if(Mobile.Page.getAttribute('ttr_chilleravailable').getValue() == true)
{
control.setVisible(true);
}
else
{
control.setDisabled(true);
}
}
cekcontrols.setDisabled(false);
return false;
}
but when i execute this script, although i check the chiller available into yes, nothing happen, the other field doesnt visible.
could someone help me correct my script?
thank you