Form Embed
The Connect intake form can be embedded on your web application with a simple code snippet. Log in to your Connect account to copy your referral snippet. If you are a service partner looking to embed a form to refer to your own products, please contact your Connect account rep to enable self-referrals.
Navigate to Integrations -> Form Embed
Trusted Referrer Hostnames
In order to prevent other web applications from embedding the form, your hostname (or domain name) must be ‘trusted’. Each hostname you plan to embed the form on should be listed in the ‘trusted referrer hostnames’ area, with each hostname on a different line.
Embedding the snippet
The snippet takes the following form
<script id="connect2capital" src="https://connect.crfusa.com/api/your-partner-name/embed.js"></script>
And should be placed in the HTML where you want the form to appear, for example:
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Application form</title> <!-- Your styles and other scripts --></head><body> <!-- Your other content --> <h1>Apply here:</h1> <script id="connect2capital" src="https://connect.crfusa.com/api/your-partner-name/embed.js"></script> <!-- Your footer content --></body></html>
The embed.js file will automatically generate a new div element with id c2c-root
adjacent to the script with the Connect intake form.
Changing form language manually
The form will, by default, detect the user’s language based on their browser settings. If you want to override this behavior, there are two options.
Option 1: Set the data-language
attribute on the embed script
This option will directly set the language of the form. By supplying this parameter with one the supported standard ISO-639-1 two-letter language codes, the form will render with that language.
<!-- French --><script id="connect2capital" data-language="fr" src="https://connect.crfusa.com/api/your-partner-name/embed.js"></script>
<!-- Spanish --><script id="connect2capital" data-language="es" src="https://connect.crfusa.com/api/your-partner-name/embed.js"></script>
Option 2: Set the data-language-query
attribute on the embed script
Alternatively, you can set the data-language-query
attribute on the embed script. Instead of directly setting the language in the attribute, you instead direct the embed widget to look in the URL bar for the specified query parameter. Again, the value of the query parameter should be a standard ISO-639-1 two-letter language code.
<!-- Will attempt to load the language supplied in the URL bar with the name `lang` --><script id="connect2capital" data-language-query="lang" src="https://connect.crfusa.com/api/your-partner-name/embed.js"></script>
<!-- Or instead of `lang`, if you use `culture`: --><script id="connect2capital" data-language-query="culture" src="https://connect.crfusa.com/api/your-partner-name/embed.js"></script>
<!-- Or if you use `lng` --><script id="connect2capital" data-language-query="lng" src="https://connect.crfusa.com/api/your-partner-name/embed.js"></script>
<!-- ...etc -->