Embedding 3B Forms in Various Environments
Jump to navigation
Jump to search
Forms version 6.6+ brings the ability to embed forms outside of Salesforce, securely.
Embedding on External Websites
Use the generated code by the publisher for embedding Forms outside of salesforce. The code generated will look similar to this:
<script src="https://3bforms-dev-dev-ed.my.salesforce-sites.com//resource/b3f__FormCompleteLWC/index.js" defer="true" type="module"/>
<x-form-complete org-url="https://3bforms-dev-dev-ed.my.salesforce.com" site-url="https://3bforms-dev-dev-ed.my.salesforce-sites.com" ai-endpoint="https://ai.3bapi.com/ai" form-id="a00KC000001RCUwYAO" record-id="" version-id="" key="" ai-model-name="gpt-4o-mini" captcha-site-key="6Ld758YqAAAAAH2ROcOb3yYDVxewotUMHeGYv6ey" org-id="SET_THIS_FOR_AI" user-id="SET_THIS_FOR_AI" page-ip-address="YOU_MUST_SET_THIS" session-id="NULL_SESSION_ID" user-type="Guest" theme-type="light" > </x-form-complete>
Notes:
- When embedding outside of salesforce, you will need to add a CORS exception for the domain where the form will be hosted
- If using the re-captcha functionality, ensure that your recaptcha settings whitelist the domain where the form is embedded
- When upgrading forms, the changes might reflect after 24 hrs on embedded forms
Embedding inside Salesforce
Use the Embedded Form component from the 3B Onboarding Package
Embedding in Communities/Digital Experiences
Use the Embedded Form component from the 3B Onboarding Package