Skip to main content

Site-Aware FormsProNew in 5.2+, Improved in 5.7+

Allows you to optionally enable Site awareness in Freeform to show/hide them for specific Sites and enable translations per site for forms to have unique labels and messages on the front end.

Overview

When this feature is enabled, forms become aware of the currently active Site when loaded on the front end. In the control panel, you can filter form lists by Site and prevent other admins from accessing forms that belong to Sites they don't have access to. By default, any new forms created will be visible for the Site they were created on (with the ability to enable additional sites).

To enable translations on forms per Site, go to the form builder and enable the 'Translatable' setting under the 'Settings' tab.

Settings

Inside the General Settings page, you can enable this feature by toggling ON the Site-Aware Forms setting (or sitesEnabled: true in Project Config).

Form BuilderUpdated in 5.7+

Once enabled, an additional Sites setting and Translatable toggle will appear for forms inside the Settings tab of the form builder.

TranslationsNew in 5.7+

Once the Translations setting is enabled for a form, various parts of the form will become available for translation. The translation process is similar to other areas within the Craft control panel. You will notice the familiar translation icon next to any setting that can be translated. To set a different value for other sites, use the Site picker at the top of the page.

The translation icon will turn blue if a translation exists for a site other than the primary site. Clicking this icon will allow you to cancel the translation value for that site and revert it to the configuration set for the primary site.

Translatable Settings

Various settings for forms become translatable, including form name and description, processing text, and success and error messages.

Translatable Fields

Various settings for fields become translatable, including label, instructions, placeholder, default value, and custom error validation message.

Translatable Field Options

If a field contains options such as Dropdowns or Checkboxes, the option labels can be translated, while the option values remain fixed for sites other than the primary site. Additionally, the same set and quantity of options must be maintained across all sites.

Translatable Items

The following items are translatable:

  • Settings →
    • General →
      • Form Name
      • Form Description
    • Processing →
      • Processing Text
    • Success & Errors →
      • Success Message
      • Error Message
  • Form Layout →
    • Page Tab Names
    • Submit Buttons →
      • Labels
    • Fields →
      • Label
      • Instructions
      • Placeholder
      • Default Value
      • Custom Validation Error
      • Custom Options →
        • Option Labels

Options and labels inside of Opinion Scales and Table fields are currently not translatable at this time.

Field Compatibility

The chart below shows the translatable options for each field type.

Field TypeLabelInstructionsPlaceholderDefault ValueError MessageOption LabelsSpecial
CalculationN/AN/AN/A Calculation Logic
CheckboxN/AN/A Checked by Default
CheckboxesN/A Element Sources,  Predefined Options
ConfirmN/AN/AN/A
Date & TimeN/A Force Locale,  Date/Time Configuration
DropdownN/A Element Sources,  Predefined Options,  Empty Option Label
EmailN/AN/A
File UploadN/AN/AN/A Asset Source,  File Configuration
File Upload Drag & DropN/AN/A Asset Source,  File Configuration
GroupN/AN/AN/AN/AN/A
HiddenN/AN/AN/AN/AN/A
HTMLN/AN/AN/AN/AN/A Content
InvisibleN/AN/AN/AN/AN/A
Multiple SelectN/A Element Sources,  Predefined Options
NumberN/A Value Configuration
Opinion ScaleN/A Options,  Scales
PasswordN/AN/A
PhoneN/A Pattern Validation
RadiosN/A Element Sources,  Predefined Options
RatingN/AN/AN/AN/A
RegexN/A Pattern,  Pattern Error
Rich TextN/AN/AN/AN/AN/A Content
SignatureN/AN/AN/A Configuration
Stripe PaymentN/AN/A Payment Description,  Configuration,  Redirect URLs
Submit buttonsN/AN/AN/AN/AN/A Positioning
Table Button Labels/Markup
TextN/AN/A
TextareaN/AN/A
WebsiteN/AN/A

Site Switcher

The Site switcher will be present in several areas of the Freeform control panel.

Forms

Forms can be filtered by Site(s) they are assigned to. If a user only has access to one or some of the Sites, the Site switcher will automatically limit what is visible to them.

Site 1 Example

Site 2 Example

Site 3 Example

Submissions

The Submissions index will filter its form source filters by forms that are available for the active Site, and the All Submissions source filter will only display submissions for forms that are available for the active Site.

Export Profiles

Export profiles will become filtered by forms that are assigned to the active Site.

Templates

It's important to note that if a form is only enabled for Site A and Site B, it will show when viewing Site C in the front end.

Retroactively Apply to Existing Installs

If you wish to enable this feature retroactively to an existing Craft install, please follow the steps below:

1

Enable the Site-Aware Forms setting in Freeform.

2

Open up each form, update the Sites setting inside the Settings tab and save the form.

  • Repeat for every form on your site.
  • By default, every form will have NO Sites checked off, but Freeform assumes the form should be active for ALL Sites if that is the case.
3

Run the following CLI command (otherwise only your primary site will be able to see submissions in the control panel):

php craft freeform/submissions/resave
Finished!

What It Doesn't Do

Here are some things it cannot do:

  • Translations of Freeform submissions per site.
  • Unique settings per site.
  • Unique integrations per site.