Hi Folks,
I have a form with a variable length table, with one column containing a File Upload field. Without going into too much detail, how do I disable the upload button using JS? I am currently using the following code:
$(document).ready(function () {
updateTable();
function updateTable() { //Change Read-Only attributes based upon Approval Status
$('.cf-table-block tbody tr').each(function () {
var jobType = $(this).find('.drop input:checked').val();
switch (jobType) {
case "Yes":
$(this).find('.ro input').attr('readonly', true);
$(this).find('.ro select').attr('disabled', true);
$(this).find('.ro textarea').attr('readonly','readonly');
return;
case "?":
$(this).find('.ro input').attr('readonly', true);
$(this).find('.ro select').attr('disabled', true);
$(this).find('.ro textarea').attr('readonly','readonly');
return;
default:
$(this).find('.ro input').attr('readonly', true);
$(this).find('.ro select').attr('disabled', true);
$(this).find('.ro textarea').attr('readonly','readonly');
return;
}
});
}//end of function
});
This works fine for all other field types (date, single / multiple lines and drop downs) which make up the table with the exception of the File Upload.
All fields have been assigned the class ro. I don't want to hide the field as the approver needs to review the uploaded file but not be able to change or add to this field!
Thanks,