Embed Code
The embed code is a small HTML snippet you paste into your website. It shows your FieldFlow directory or quiz right on your page.
Get your embed code
Section titled “Get your embed code”- Go to your project’s Publish tab
- In Embed on your site:
- Choose an Embed type: Directory only, Quiz only, or Quiz + directory
- Choose an Embed theme: Light (the default), Dark, or System (follow device)
- Choose a Language (see Language)
- Optionally, pre-select categories (see Start with filters)
- Click Copy code
- Replace
YOUR_API_KEYin the snippet with a key from API keys for embed on the same tab. See API Keys
The embed snippet
Section titled “The embed snippet”A directory embed looks like this:
<div id="fieldflow-directory-1a2b3c4d" data-fieldflow-theme="light"></div><script> window.FieldFlow = window.FieldFlow || { q: [] }; window.FieldFlow.q.push({ projectId: "your-project-id", apiKey: "YOUR_API_KEY", container: "#fieldflow-directory-1a2b3c4d", theme: "light", apiBaseUrl: "https://getfieldflow.io", });</script><script src="https://getfieldflow.io/embed.js" async></script>Always copy the snippet from the Publish tab rather than typing it. It fills in your project ID and the options you picked.
The container id ends with the first characters of your project ID. That way you can put directories from different projects on the same page.
Embed types
Section titled “Embed types”Directory only
Section titled “Directory only”The full directory with search and filters. This is the default.
Quiz only
Section titled “Quiz only”Shows just the quiz. Set Redirect path after quiz (for example, /resources). When a visitor finishes, they’re sent to that path on your site, with their answers added to the URL as filter parameters.
Quiz + directory
Section titled “Quiz + directory”Shows the quiz first, then the results in the same embed, with a Start over option.
See Quiz Flow to set up a quiz.
- Light (default): always light
- Dark: always dark. Use it on a dark page
- System (follow device): matches the visitor’s light or dark mode setting
The snippet always includes a theme line with your choice.
Language
Section titled “Language”The Language menu sets which language the embed starts in:
- Match page (default): uses the language your web page is set to. If your page is in Spanish, the embed starts in Spanish. If your page’s language isn’t one your directory offers, it starts in English
- English, Español, or another language you’ve published on the Language tab: the embed always starts in that language
When your directory has translated records, visitors also get a language menu in the embed:
- With Match page, the menu shows automatically
- With a fixed language, the menu is hidden unless you check Show language switcher. This option is only for Directory only embeds
See Languages Overview.
Start with filters
Section titled “Start with filters”For Directory only and Quiz + directory, you can have the directory load with some categories already selected:
- Under Start with filters (optional), check Pre-select categories in the embed
- Pick a Category column
- Check the terms to pre-select
The snippet updates automatically. Click Clear pre-filter to remove it.
If no categories are listed, turn on Enable filtering for a taxonomy in Configure > Filters & Sorting, then sync.
Who can copy embed code
Section titled “Who can copy embed code”Anyone on your team can build and copy embed code. Viewers can’t create, reveal, or revoke API keys, or save a detail page URL template.
Detail pages in embeds
Section titled “Detail pages in embeds”If detail pages are on, clicking a record opens its details inside the embed, with a Back to directory button. The page address changes too, so visitors can copy it to share a link to that record. To open your own pages instead, see Detail URL template.
Next steps
Section titled “Next steps”Paste the code into your website. See the platform guides: