If you have ever used WFFM on your page, you know that it has its own set of scripts. The way these script injected to the page has evolved which confuses a lot of front-end developer whether they are upgrading their instance or developing new pages. In this article we are going to take a look at the journey WFFM went through (scripts only) Since Sitecore 7.2 to the latest release 8.2 and also discuss the common bugs faced with each version. The focus is on MVC pages which are widely used and has more known issues.
This version assembles RequireJS. The implementation is quite buggy and troublesome. Below are is some of the known bugs of this version.
Bug ID = #80478
This error can also cause misbehavior in page/experience editor. After adding a MVC form, page/experience editor will stop working.
Workaround : request Sitecore for a patch.
Resolution: Fixed in WFFM 8.1 Update 2
Bug ID = (unknown)
Description: RequireJS is attached to global scope and does not let you add your own scripts to the page using this library.
Since this release, requiredJS has been excluded from the module.
window.$scw = jQuery.noConflict(true);
line is added to ~\Website\Views\Form\Index.cshtml so there should be no more conflict issue with your website jQuery
RequireJS is now back again without much improvement from the previous implementation in WFFM v2.4
In this version again there is no sign of jQuery.noConflict in WFFM implementation. So there should be conflict issue with your site specific jQuery library.
Appearance of the following setting. This setting determins if bootstrap.min.css should be added to WFFM form rendering or not.
<setting name=”WFM.EnableBootstrapCssRendering” value=”false” />
$.noConflict(); is added to main.js file so there should be no issues with having two jQuery on a page.