Multisite implementation with web forms
The Web Forms for Marketers module supports multisite environments. This means that administrators can define different form locations and settings for different websites. You can do this in the formsRoot
attribute in the definition of the site in the .config
files.
The value of this attribute is a Sitecore path that defines:
-
The folder that stores the forms in the current website.
-
The appearance and color settings for forms in the current website.
-
Access rights.
The formsRoot
parameter must contain either an item path or the ID of the target item. The target item must be based on the /sitecore/Templates/Web Forms for Marketers/Forms Folder
template.
For example, this is how the formsRoot
parameter is defined in the web.config
file:
<sites>
<site
name="samplesite"
virtualFolder="/"
physicalFolder="/"
rootPath="/sitecore/content"
startItem="/forms" database="web" domain="extranet"
formsRoot="/sitecore/System/modules/Web Forms for Marketers/local forms"
...
This can be defined in the Sitecore.Forms.config file using the ID:
<site name="website">
<patch:attribute name="formsRoot">
{F1F7AAB6-C8CE-422F-A214-F610C109FA63}
</patch:attribute>
</site>
</sites>
To ensure that there are no duplicated values, you should define the formsRoot
parameter in the \App_Config\Include\Sitecore.Forms.config
file.
When the formsRoot
attribute is not defined for a website, new forms are stored in the content tree, in the /sitecore/System/Modules/Web Forms for Marketers/Local Forms
folder.