Embed a complete flight-quote form — searchable airports, smart calendar, per-country phone validation — on any page. It lives in an isolated iframe, so nothing clashes with your site and no API keys are ever exposed.
Drop one <div> where the form should appear, and load the script once anywhere on the page. That's the whole integration.
index.html
<!-- 1. Where the form should appear --><divdata-quote-widgetdata-project="your-project"data-info-text="Business class — up to 70% off"data-color="#ff5a1f"></div><!-- 2. Once, anywhere on the page --><scriptsrc="https://form.daniel.bdi-kiv.dev/widget/quote.js"defer></script>
The form submits to our backend on the same origin as the script — your API key stays server-side and is never shipped to the browser. You only paste the two lines above.
Configuration
Four knobs, set on the div
Everything is configured with data-* attributes — no build step, no JavaScript. Change them, copy the snippet, paste. The preview below is live — resize it to any device.
Attribute
Type
Default
Description
data-project
string
default
Project key sent with every lead, so you can route or segment leads by source.
data-info-text
string
—
A free-text note (the “info box”) attached to the lead — e.g. the campaign or offer the form was shown with.
data-color
hex color
#ff5a1f
Accent color for the buttons, focus rings and selected dates. One value recolors the whole form.
data-session-id
string
null
An optional session id passed straight through into the lead’s sessionId — use it to tie the lead back to your own analytics or session.
origin_url is automatic. The URL the lead was submitted from is captured from the host page for you — it is not an attribute and cannot be set by configuration.
your snippet
1040px
live preview
Embed guides
Works on every platform
The widget is plain HTML + one script, so it drops into any site builder or framework. Here are the exact steps for the common ones.
🟣
Webflow
Drag an Embed element where you want the form.
Paste the <div data-quote-widget …> into it.
Open Project Settings → Custom Code → Footer Code and paste the <script> line.
Publish. The form appears and auto-resizes.
Tip: you can also put both lines inside one Embed element.
🔵
WordPress
Edit the page and add a Custom HTML block.
Paste both lines (the div and the script).
Update / publish the page.
Classic editor: use the Text tab, or a “Custom HTML” widget.
⬛
Squarespace
Add a Code block where the form should sit.
Paste the div, then the script line.
Save. (Code blocks need a paid plan.)
🟢
Shopify
In the theme editor add a Custom Liquid section.
Paste both lines into it.
Save and publish the theme.
⚛️
React / Next.js
Render the <div data-quote-widget …> in your component.
Load the script with next/script (or a useEffect).
The loader re-scans on load, so the div just needs to exist when the script runs.
📄
Plain HTML
Paste the div where the form goes.
Paste the script before </body>.
No dependencies, no build — it just works.
How it works
Isolated, secure, self-sizing
1
Renders in an iframe
The loader injects an iframe pointing at our /embed page. Your CSS and JS can’t leak in, and the form’s styles can’t leak out — zero conflicts.
2
Posts same-origin
On submit the form POSTs to our backend, which validates the lead and forwards it to the real quote API server-side. The auth key never reaches the browser.
3
Auto-resizes & notifies
The iframe measures itself and reports its height to your page, so there’s never an inner scrollbar. On success it posts a quote-widget-submitted message you can hook.
Hook the submit event (optional)
on your page
// Fired after a visitor successfully submits the form.window.addEventListener('message', function (e) {
if (e.data && e.data.type === 'quote-widget-submitted') {
// e.data.id = the saved lead idwindow.location.href = '/thank-you'// e.g. redirect, or fire analytics
}
})
The widget already shows a “Thanks!” confirmation inside the iframe — this event is only needed if you also want to redirect or track on the host page.
The lead
What your backend receives
Every submission posts a single JSON object: the visitor’s contact details plus the structured quote request. flight legs, cabin and trip type are built from the form; project, info_text and origin_url come from the embed.