I recently noticed that you can either select one or multiple attachments for an adaptive form. I would l ike to limit the number of attachments to 4. How can I do that?
Solved! Go to Solution.
Views
Replies
Total Likes
Simply use the following script in the validate event of the file attachment field. it works.
if(this.value.split("\n").length < 5) { true; } else {false;}
@lsmurph use this on value commit of attachment:
guideBridge.getFileAttachmentsInfo({
success:function(list) {
for(var i = 0; i< list.length; i++) {
// console.log(list[i].name + " "+ list[i].path);
if(list.length>4)
document.getElementsByClassName('button-default button-medium guide-fu-attach-button')[0].disabled=true;
}
}
});
Simply use the following script in the validate event of the file attachment field. it works.
if(this.value.split("\n").length < 5) { true; } else {false;}