Has anyone implemented custom javascript / custom approval form to make the comments field mandatory for approvals/rejections (Specifically Rejections only)?
Has anyone implemented custom javascript / custom approval form to make the comments field mandatory for approvals/rejections (Specifically Rejections only)?
Hello,
I've done something like this. I basically disabled the submit button on the form until the comments were added.
This might not be 100% but will give you an idea.
Within a document.ready function add the following.
//Add On Click Function
$('input[name="nodeUserData_acm.trans.script.value"]').click(function(){
//Get Value of Radio Button
var sRadioValue = $('input[name="nodeUserData_acm.trans.script.value"]:checked').val();
if(sRadioValue == "Rejected"){
//Disable Submit Button
$('#Submit',window.parent.document).attr.('disabled','disabled');
}
see similar post - How to make comments mandatory?