Looking for some guidance on best practices for external JS files

We are using Plumsail forms for SharePoint Online. We have 300+ forms that we have developed and, on average, each form has 200+ lines of Java Script. We also have a pretty sizable CSS file that we reference and maintain in the Site Assets library.

Has anyone ever tried to consolidate all this Java Script into a single js file outside of the form designer, reference this external js file from inside the designed form, just using 5-8 lines of code like you would to reference an external CSS file, and then call a master function in that external js file and pass through the arguments (fd.webUrl, LIST, CONTENT_TYPE and FORM) - New, Edit, Display.

Much of the Java Script code we use is replicated in every Form, with minor variations, and therefore, when we have to make a change to that replicated code, we have to update 300+ forms.

Hey @vhancock,

Here's a topic on this: Is it possible to store plumsail javascript functions in an external file

Let me know if this approach works for you.

Thank you. Yes this worked just fine. Strange that I could not find this in the search, but hey, I am a happy Plumsail user.

1 Like