Form Embed Code Generator
Generator
Generate Embed Code Automatically
WittyForm generates ready-to-paste embed code for every form you create. Choose your embed type, customize the look, and copy the code.
Get Embed Code FreeEmbed Types
Inline Embed
The form renders directly inside your page content, replacing a div element. Best for landing pages and dedicated form pages.
<div id="wittyform-embed"></div> <script src="https://wittyform.com/embed.js" data-form-id="YOUR_FORM_ID" data-type="inline"> </script>
Popup / Modal
The form opens in a centered overlay when triggered by a button click or timer. Best for lead capture without leaving the page.
<script src="https://wittyform.com/embed.js" data-form-id="YOUR_FORM_ID" data-type="popup" data-trigger="button" data-button-text="Open Form"> </script>
Slide-In
The form slides in from the bottom-right corner after a delay or scroll trigger. Best for feedback widgets and NPS surveys.
<script src="https://wittyform.com/embed.js" data-form-id="YOUR_FORM_ID" data-type="slider" data-delay="5000"> </script>
Full Page
The form takes over the entire page. Best for standalone surveys and registration flows.
<script src="https://wittyform.com/embed.js" data-form-id="YOUR_FORM_ID" data-type="fullpage"> </script>
Platform-Specific Guides
WordPress
Paste the embed code into a Custom HTML block on any page or post.
Webflow
Add an Embed element and paste the inline embed code into the code field.
Shopify
Edit a page in the code editor and paste the embed snippet where you want the form.
Squarespace
Add a Code Block to any page and paste the embed code.
Next.js / React
Use an iframe for the simplest setup, or load https://wittyform.com/embed.js in a useEffect hook.
HTML / Static Sites
Paste the embed code snippet directly into your HTML file.
Embed Best Practices
- 1
Use the inline embed for forms that are the main purpose of the page (contact, registration, application).
- 2
Use popup or slide-in for secondary actions like feedback collection or newsletter signups.
- 3
Set a minimum height on the embed container to prevent layout shifts as the form loads.
- 4
Add the loading="lazy" concept: if the form is below the fold, defer loading with a scroll trigger.
- 5
Test the embed on mobile: ensure the form is responsive within its container and does not overflow.