EXPERIENCE EDITOR: UPDATING WFFM DEFAULT FORM LOCATION

With Sitecore 8 and higher, we have a stronger focus on the experience editor and the ability of the editor to create and edit a page completely within the experience editor without having to switch to the content editor. For this reason, it’s important to set our renderings’ datasource locations and template types to keep our content organized. However, not all modules are created equal and sometimes updating these fields in our rendering is not enough. This is usually the case with modules that implement their own wizard to create its datasource items.

This is the case with WFFM forms created from the experience editor. When creating a new form, we are presented with a custom wizard where we can create a new form or choose an existing form. If we choose to create a new form, WFFM will create the item in its default location: /sitecore/system/Modules/Web Forms for Marketers/Website

This path is not stored in Sitecore, but rather in a config entry. In order to change it, we can add a formsRoot attribute to our <site /> node configuration (Site definitions) where we can add our desired path or the GUID of our folder:

Now, whenever we create a new form through the experience editor, Sitecore will create the datasource item in the new location:

Hope this tip is useful as we focus and put stronger focus in the experience editor in new or excising Sitecore projects.

Leave a Reply

Your email address will not be published. Required fields are marked *