0

In list I have a column name Comments multiline text box (append type) which is appending user comments , I want to validate that user must upload file in comment box before saving else it will not allow to save the item.

I am trying using below script but not working as expected:

var attach= document.getElementById(“Comment”);
if (attach== null || attach.rows.length == 0)
{
   document.getElementById(“Comment”).style.display=’none’;
   alert(“Please attach Documents in the Attachment Section.It is Mandatory”);
   return false ;
}
else { return true ;}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.