SharePoint List : Check if the user has attached file

​​<script type="text/javascript" language="javascript">
function PreSaveAction() {
    var attRow = document.getElementById("idAttachmentsTable");
    if (attRow == null || attRow.rows.length == 0)
{
document.getElementById("idAttachmentsRow").style.display='none';
alert("Please attach the file. Attachment is mandatory");
return false ;
}
else { return true ;}
}
</script>​

Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell