Hi,
Yes it's possible. We use the following JavaScript to check the number of attachments associated with the request. This script sets a variable to the number next to the Attachments link.
var attachments = document.getElementsByName("attachments-1")[0].innerText.match(/\(([^)]+)\)/)[1];
if(attachments == 0){
alert("Please add an attachment then press Submit again.");
return false;
} else {
console.log(attachments + ' attachments found');
return true;
}
You can use this in an onSubmit function to stop the user from submitting the form if they haven't added an attachment.