Embed a form on your website
Show a Bodek form inside your own web page with the Bodek Forms embed script.
You can show a form directly on your website, styled with your form's design, using the Bodek Forms embed script. Forms can't be placed in an <iframe>.
1. Create a key for your site
Embedding needs a Forms API key, created in the developer console at dev.bodek.us. Your plan needs to include Bodek Developers.
- In the console click New key and choose the Forms service.
- Tick only the
forms.submitscope. - In Allowed origins, enter your website's domain, for example
www.example.com. - Click Create key and copy it. It's shown only once.
With only forms.submit and your domain set, the key can only be used to show and submit forms on your site. See Create an API key.
2. Add the code to your page
Put this where the form should appear, replacing FORMID with your form's ID and adding your key:
<div data-bodek-form="FORMID"
data-bodek-key="bf_live_…"
data-bodek-api="https://forms.bodek.us/api/v1"></div>
<script src="https://forms.bodek.us/sdk/bodek-forms.js"></script>
The form fills the width of the element you put it in, so set a width in your page's CSS if you want it narrower.
What works in embedded forms
Your form's colours, logo and custom CSS, conditional logic, file uploads and e-signatures all work the same as on the form's own page.
