I followed the instructions explained here (only the topic with the code) Mandatory File Attachmant

on how to make the attachment mandatory (my request is that there can be multiple documents), however, when the form is edited on infopath, the script put on top does not work any longer and it will not even let me close/save the page.

Is this normal? How to have the mandatory attachment field on an infopath form? (infopath is 2013 and sharepoint is on-line

  • if you mean that you are trying PreSaveAction() method then that method I have only used with the default NewForm.aspx. I am not sure if it works with infopath as well. – HarryB Jan 12 '17 at 10:41
  • this might be helpful -maxmorrow.wordpress.com/2012/05/03/… – HarryB Jan 12 '17 at 10:50
  • I have tried to edit the page of the new form, add a script editor and place the script, it does not let me save the page with the infopath form, is there any other place where I can put the code? I have tried the other workaround and it does not work on my case, dont understand why – susan Jan 12 '17 at 10:51
  • The PreSaveAction() method will not work with an infopath form. Try the count() function shown in the blog link that I provided – HarryB Jan 12 '17 at 11:01
  • I have just tried it and when I copy paste that formula it gets transformed into something else and when I try to re edit it the software shows me that there are no rules, dont know why. All those pages explaining that method are based on IP 2010 and not 2013 – susan Jan 12 '17 at 11:05

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.