I need to add custom CSS and JavaScript to an InfoPath web-based form.

For which I am planning to export the source files and customize the view1.xsl file.

If I add the customizations in the header, they will be removed by InfoPath Designer next time I edit the form.

If I add the customizations in the body, some other developer may remove them.

My question is - what is the proper way to add customizations? Thank you!

  • My experience has been that if you need to do that (CSS and JS), then use a customized Newform.aspx page instead. It is significantly less frustrating than trying to beat InfoPath into submission. – Eric Alexander Dec 30 '14 at 16:39
  • Thank you! I wouldn't be sure where to start. Could you point me to a link? – user4823 Dec 30 '14 at 16:59

In the page where your infopath is shown, add a script editor web part and there add your code or the url of css files. I've even add a visual web part to prefill infopath's fields with data (like last month salary) .

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy