Need some help on the matter below.
JS using hook in table_dv and it's not working
Code: Select all
if( ($memberInfo['custom'][3] == 'REQUESTOR') ){
$html .= <<<EOC
<script>
\$j(function(){
\$j('#employee_number-container').select2('readonly', true);
\$j('#update').hide();
})
</script>
EOC;
}
}
Table Format:
employee_number is a lookup drop down field from another table (field)
the above \$j('#employee_number-container').select2('readonly', true); was suggested by Ahmad and it's not working.
i have tried the following:
\$j('#employee_number').select2('readonly', true); [not working]
\$j('#employee_number').prop('readonly', true); [not working]
\$j('#employee_number').attr('readonly', true); [not working]
\$j('#employee_number').select2('disabled', true); [not working]
\$j('#employee_number').prop('disabled', true); [not working]
\$j('#employee_number').attr('disabled', true); [not working]
\$j('#employee_number').select2('enabled', false); [not working]
\$j('#employee_number').prop(''enabled', false); [not working]
\$j('#employee_number').attr(''enabled', false); [not working]
Using AppGini 5.72 (rev 1038)
Need some enlightenment from any expert out there.
TQ in advance.