Embed a Form in Salesforce Experience Cloud
Introduction
Salesforce Experience Cloud (formerly known as Community Cloud) allows you to create branded digital experiences (or websites). You can easily embed Formcrafts forms into your Experience Cloud sites.
This guide will walk you through the three main steps to embed your form in a Salesforce Experience Cloud website.
Step 1: Trusted Sites for Scripts
First, you need to configure your Experience Cloud security settings to allow the Formcrafts script to load.
- In the Experience Builder, navigate to Settings → Security & Privacy
- Under Trusted Sites for Scripts click on Add Trusted Site
- Enter
https://app.formcrafts.com
in the URL field - Click Add Site

This step ensures that Formcrafts scripts can execute properly within your Experience Cloud environment.
Step 2: Add embed.js to Header
Next, you need to add the Formcrafts embed script to your Experience Cloud site header.
- Now go to the Advanced section in the left sidebar
- Under Head Markup, click on Edit Head Markup, and add the following script tag:
<script src="https://app.formcrafts.com/embed.js"></script>
- Click Save to apply the changes
This script enables the form embedding functionality across your entire Experience Cloud site.
Step 3: Use the Embed Code
We now have to grab the embed code. Please follow these steps to find the embed code for your form.
Your embed code looks something like this:
<div data-fc-key="abcd1234" style="max-width:500px; height:600px"></div><script src="https://app.formcrafts.com/embed.js"></script>
Copy the first half of the code (the div
part). Next,
- Add an HTML Editor component to your Experience Cloud page
- Paste the
div
part of the embed code into the HTML Editor (via Edit Markup) - Click Save to apply the changes

Notes
- You can use Formcrafts’ fallback embed code as well. This will allow you to skip the first two steps. However, this is not recommended since certain features (like prefill, redirect, Google Analytics, etc.) may not work properly with the fallback embed code.