Prevent more than one attachment

Forums Classic DFFS Prevent more than one attachment

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #20667
      Ivan Wilson
      Participant

      Any suggestions on how I can restrict the New and Edit form for a list item to prevent more than one attachment?

    • #20683
      Alexander Bautz
      Keymaster

      I think I have answered something like this before, but cannot find it – maybe it was answered by email.

      What you need to do is to add something like this in your Custom JS:

      setInterval(function(){
      	if(jQuery("#idAttachmentsTable tr").length > 0){
      		spjs.dffs.doReadOnly(["Attachments"]);
          }else{
      		spjs.dffs.undoReadOnly(["Attachments"]);
          }
      },1000);

      I haven’t tested it so it might need some tinkering, but you can try it out.

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.