Learn how to embed your Formora forms directly into your website or application using various methods like JavaScript embeds or iFrames for a seamless user experience.
Formora Embed Options Panel
Script Tag (Recommended)
<div>
element to your HTML where you want the form to appear, and include a JavaScript file from Formora. The script will then dynamically render the form into the placeholder.Embed Code Structure:
You’ll typically need two parts:</body>
tag):
data-
attributes on the placeholder div
):data-form-id="YOUR_FORM_ID"
: (Required) Your unique form ID.class="formora-embed your-custom-class"
: You can add your own custom classes for additional styling.data-no-resize="true"
: Add this attribute if you want to disable the script’s automatic height adjustment (default is false
, meaning auto-resize is enabled).data-api-key="YOUR_API_KEY"
: If your embedding scenario requires an API key for authentication or specific features.Basic iFrame
<iframe>
HTML tag to your page, setting its src
attribute to your form’s unique URL.Embed Code Structure:iframe
attributes):src="https://formora.site/f/YOUR_FORM_ID"
: (Required) The direct URL to your published Formora form.title="Your Form Title"
: Important for accessibility. Set a descriptive title.width="100%"
: Set the width (e.g., "100%"
for full width, or a specific pixel value like "600px"
).height="600px"
: Set the height. You might need to adjust this based on your form’s content.frameborder="0"
: Removes the default border around the iframe.loading="lazy"
: Enables lazy loading, which can improve page performance.scrolling="no"
: If you want to prevent scrolling within the iframe (though this might cut off content if the form is taller than the specified height).Responsive Height Adjustment
Custom Styling
data-theme
: “light” or “dark”data-primary-color
: Any valid CSS colordata-font-family
: Any valid CSS font familydata-border-radius
: CSS border-radius valuedata-button-style
: “filled” or “outlined”Form Events & Callbacks
form-submitted
: Triggered when the form is successfully submittedform-error
: Triggered when there’s an error during submissionform-started
: Triggered when the user starts filling out the formform-abandoned
: Triggered when the user leaves the form without submitting100%
or use responsive units.loading="lazy"
for iframes that are below the fold.title
attribute for iframes.Form Not Loading
Styling Conflicts
Form Submission Issues