Widget Integration
Learn how to integrate FormLab Widget into your website.
FormLab Widget allows you to embed your forms into any website. The widget is highly customizable and supports multiple display types and launch triggers.
Installation
To add FormLab Widget to your website, simply copy and paste the provided code snippet where you want the form to appear:
Code
<!-- FormLab Widget -->
<div id="formlab-[your-form-id]"></div>
<script
async
src="https://widget.formlab.ai/formlab-widget.min.js"
data-form-id="[your-form-id]"
data-config='{ "type": "standard" }'
></script>
Widget Types
FormLab supports four different widget types:
- Standard – Embeds the form directly into your page
Code
{
"type": "standard"
}
- Full Page – Takes over the entire page
Code
{
"type": "full-page"
}
Performance
The widget script is automatically optimized for performance:
- Loads asynchronously to prevent blocking
- Prefetches form data for faster display
- Lazy loads resources as needed
Browser Support
FormLab Widget supports all modern browsers:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Troubleshooting
If you encounter any issues:
- Check that your form ID is correct
- Ensure the script is loaded properly
- Check browser console for any errors
- Verify your configuration syntax