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-&#91;your-form-id]"></div> <script async src="https://widget.formlab.ai/formlab-widget.min.js" data-form-id="&#91;your-form-id]" data-config='{ "type": "standard" }' ></script>

Widget Types

FormLab supports four different widget types:

  1. Standard – Embeds the form directly into your page
Code
{ "type": "standard" }
  1. 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:

  1. Check that your form ID is correct
  2. Ensure the script is loaded properly
  3. Check browser console for any errors
  4. Verify your configuration syntax