Use the FormAssembly Lightning Component in Salesforce Communities 

In this Article
Related Articles


The following steps will walk you through how to use FormAssembly's Lightning Component to publish a form within your Salesforce Community.

Prior to starting these steps, please make sure you have installed FormAssembly for AppExchange.  (Note: you do need to be logged into your Salesforce org to access this upgrade link) by following the steps outlined here.

Please note, you do not need to use the Salesforce Community Authentication (available at the Enterprise level) in order to use our Lightning component and embed a form in your Community.   This is an option, if you would like your forms to be restricted only to your Community members, however, it is not required.

Additionally, if you are a Premier or Enterprise user, you can use the Salesforce Prefill Connector with our Lightning component.  If you are an Enterprise user, you can use the Prefill Connector with the Salesforce Communities Authentication enabled (although it is not required). 

You also do not need to setup Single-Sign On (SSO) between Salesforce and FormAssembly in order to be able to use the FormAssembly Lightning component.

The Lightning component can be installed in a sandbox by using this link.

Please note that support for Communities varies across device type and browser. Please refer to Salesforce for information pertaining to their browser support requirements for communities

Configuration Steps

1. Go to SetupAll Communities and click Manage for the community where you plan to publish your form.

2. Go to the Community Builder, find the page where you want to publish the form, and select Components.

3. Next, select FormAssembly Form under Custom Components. If you do not see this option, please make sure you have installed FormAssembly from the AppExchange and have updated to at least version 2.15.

Please note: If you are not using the Salesforce Communities Authentication, you do not need to complete the remaining steps. You only need to add in the Form ID (found on the Publishing page in FormAssembly) to the component dialog box.  If you are using Communities Authentication, please continue with the following steps.

4. Drag the form to place on your page where you would like it. Then, open a new tab or browser window and login to your FormAssembly account.

5. Within FormAssembly, find the form you would like to publish and go to ConfigureProcessing.

Please Note:  Salesforce communities auth is only available with Enterprise and Compliance Cloud plans.  Premier plan customers can still publish their forms in a community, but you will need to skip steps 5-8.

6. Under Allow Responses From select Salesforce Community User.

7. Click Configure and then enter your Portal Login URL and Salesforce Org ID. Additional information and details on this process can be found on our Salesforce Communities Authentication page.

8. Next, scroll down to Step 2. FormAssembly Lightning Component.  You will need to copy and paste these two values over to the Lightning Component dialog box on your Community Builder page.

9. Return to your Community Builder page and paste the token value into the Lightning Component dialog box. Additionally, you will need to paste in the Form ID, which can be found at the top of the configuration page.

Please note: If you are not using the Salesforce Communities Authentication, you will not need to paste in the form token, and that can be left blank.

10. Press enter on your keyboard to save that information. Finally, publish the changes to your Community. You should now be able to see the form when logged in to your community.

Salesforce Winter '21 Release Notes

With the Winter '21 release to Salesforce, the following Critical Updates will be activated: "Restrict Access to @AuraEnabled Apex Methods for Guest and Portal Users Based on User Profile" and "Restrict Access to @AuraEnabled Apex Methods for Authenticated Users Based on User Profile". To ensure the continuing function of forms embedded using the FormAssembly Lightning Component for Salesforce Communities, you will need to assign specific Apex Classes to Guest and Community Users.   

Follow these instructions for adding the FormAssembly Apex Class Permissions for Users. You may follow the steps in either of the two options:

Option 1: Using Enhanced Profile Views to modify User Profiles

Please note: You will need to enable the Enhanced Profile User Interface and the Enhanced Profile List Views permissions under Setup > Users > User Management Settings to use this method.

  1. Navigate to Setup > Users > Profiles

  2. Select your Community User profile

  3. Under the App section, select Apex Class Access

  4. Select Edit

  5. Select all Available Apex Classes containing the "tfa." prefix namespace and add them to the Enabled Apex Classes (note: Apex Classes are case-sensitive and the lowercase "tfa." classes may appear towards the bottom of the list)

  6. Click Save

Option 2: Adding User Permission Set
  1. Navigate to Setup > Users > Permission Sets

  2. Create a new permission set to apply to users that need access to FormAssembly forms embedded in Salesforce Communities. 

  3. Select the newly created permission set.

  4. Under the Apps section, select Apex Class Access

  5. Click Edit.

  6. Select all Available Apex Classes containing the "tfa." prefix namespace and add them to the Enabled Apex Classes (note: Apex Classes are case-sensitive and the lowercase "tfa." classes may appear towards the bottom of the list)

  7. Click Save

  8. Click on Manage Assignments to apply the permission set to any users that need access.


After you publish your form, if you are seeing "Please wait" or "Form will be displayed here" on your live community where the form should be, there are a few setting you will need to check to attempt to resolve this error.

For FormAssembly App version 2.4 or Lower:

You will need to complete the new package setup process introduced in version 2.15 up to current version. You can access the documentation on how to install FormAssembly for AppExchange here.

For FormAssembly App version 2.34 (current version):

Go to SalesforceSetupInstalled PackagesConfigure (for FormAssembly) under FormAssembly Setup Information. This will take you to the following screen:

To confirm what the instance URL is, you'll need to scroll down and go to "previous", "edit details", "previous", then you will end up at this page:

You will need to make sure the instance URL does not include the https:// here. 

Once you've confirmed the installed package URL is correct,  you will need navigate to Setup Custom Settings → Manage → Edit. Make sure the instance URL matches the installed package URL (does not include the https://):

Refresh your community, and your form should now show.

2. If the Custom Setting does not resolve the error, go to SalesforceSetupCSP Trusted Sites. If your FormAssembly instance URL is not configured as a trusted site, add it here. 

In addition to your FormAssembly instance URL (Enterprise and Compliance Cloud users) we recommend adding the following sites to your list of CSP Trusted Sites:


3. If the form is still not displaying, go to SalesforceSetupManage Users → Profiles. Find the user profile that you are using for your Community User and click Edit. Using CTRL-F, search for "API" and confirm that the API Enabled setting is checked:

Please note: The standard Community User Profile provided by Salesforce does not have the API Enabled setting checked, so you will need to make a clone of that profile and check the setting in order for users to access forms within the community. 

If you are still not able to see your form in the community, please contact our support team

Prefilling with the Lightning Component

When a form is embedded in a Community with the FormAssembly Lightning Component, it is possible to use standard prefilling methods to prefill Salesforce data into your form.

  1. You can prefill through the Community page URL.
  2. You can prefill your form using the Salesforce Prefill Connector. 
  3. If you have enabled Salesforce Communities Authentication, then you can prefill using session parameters

Please note, we always recommend only embedding a single form onto a single Community page, particularly when prefilling. 

When prefilling using methods 1 and 2, you'll need to add the prefill values to the URL of the Community page. For example, if your form was embedded on your community page at the following URL:

Then you would need to append ?field_alias=XXXXXX to the end of the URL if you're prefilling through the URL, or ?queryparameter=XXXXXX to the end of that URL if you're using the Salesforce Prefill Connector. 

In the end, your link would look similar to this:

Please refer to the help document for your chosen prefilling method before building your link. 

Please note: The page your form is embedded on within your community is not the same as your Portal Login URL.  After you login to your community, you will be able to access the URL of the page where your form is embedded. 
Terms of Service · Privacy Policy