Formstorkdocs
PricingENTRDashboard

Popup button

Every site seems to have a chat bubble, but almost nobody is actually online to chat. The popup button gives you the good part, a friendly, always-visible way to get in touch, without staffing a chat. One script tag adds a floating button to your site; clicking it opens your Formstork form in a popup.

<script
  src="https://app.formstork.com/js/widget-v1.js"
  defer
  data-form="YOUR_FORM_ID"
></script>

Replace YOUR_FORM_ID with your form’s access key. The form itself is the hosted form you design in the form builder, publish it there first, then copy this snippet from Builder → Share.

Options

Everything is configured with data- attributes on the script tag:

Attribute Default Description
data-form required Your form’s access key
data-color #4f46e5 Button background color (any CSS color)
data-position right Corner to sit in: right or left
data-label Contact us Accessible label for the button and popup
<script
  src="https://app.formstork.com/js/widget-v1.js"
  defer
  data-form="YOUR_FORM_ID"
  data-color="#0d9488"
  data-position="left"
  data-label="Send feedback"
></script>

The form’s own design, fields, title, accent color, logo, multi-step, comes from the form builder, so it always matches what you published there.

Recipes

A few ready-to-paste variations. Swap in your own access key.

Support button, bottom-left, teal

<script
  src="https://app.formstork.com/js/widget-v1.js"
  defer
  data-form="YOUR_FORM_ID"
  data-color="#0d9488"
  data-position="left"
  data-label="Get help"
></script>

Feedback button that matches your brand

<script
  src="https://app.formstork.com/js/widget-v1.js"
  defer
  data-form="YOUR_FORM_ID"
  data-color="#f97316"
  data-label="Send feedback"
></script>

Open from your own link or CTA

Add the script once, then open the popup from any element with the JavaScript API below:

<button onclick="Formstork.open()">Contact sales</button>

Open automatically after a delay

<script>
  setTimeout(function () {
    if (window.Formstork) Formstork.open();
  }, 8000); // 8 seconds after load
</script>

JavaScript API

The script exposes a tiny global for programmatic control:

Formstork.open();
Formstork.close();
Formstork.toggle();

Useful for opening the form from your own links or buttons:

<a href="#" onclick="Formstork.open(); return false;">Contact us</a>

Behavior

  • Auto-sizing, the popup grows and shrinks to fit your form’s content.
  • Mobile, on small screens the popup opens full-screen; the floating button stays on top to close it.
  • Keyboard, the button is focusable, Escape closes the popup, and all form fields are keyboard-accessible.
  • Lazy with intent preload, the form is not loaded on page load, so it adds no weight to your initial render. It quietly preloads the moment someone hovers, focuses or taps the button, so by the time they click it opens instantly, no spinner, no jump.
  • Spam & CAPTCHA, everything configured on your form (honeypot, spam filtering, CAPTCHA) works inside the popup too.

Versioning

The v1 in the URL is the major version. Patches and improvements ship to the same URL without breaking changes; a breaking change would ship as widget-v2.js.