Hi,
I don't know what I am doing wrong..I am trying to hide some fields using Before Display Event, but it is not working:
Example of my code:
if ($values["audit_type_id"]==1){
// Hides
$xt->assign("annual_accredition_fees_fieldblock",false);
}
else{
// Shows
$xt->assign("annual_accredition_fees_fieldblock",true);
}
-----------------------------
Note, I also have JAVASCRIPT ONLOAD EVENT on the edit page (related to the same field) not sure if this is causing the issue.
ctrlAuditType.on('change', function(e)
{
if (this.getValue() ==1)
{
document.getElementById("depositdiv1").style.display="table-row";
document.getElementById("depositdiv7").style.display="none";
}
*depositdiv7 hides the annual_accredition_fees field***
The ONLOAD event works as expected and hides fields based on the selection of Audit Type. However, once you save the record and then try to edit it again, I don't want to display the fields I've hidden using the ONLOAD event, hence the BEFORE DISPLAY event...but it is not working...
Any ideas?
Thank you,
Roman