guide

Contact forms — inline, modal, popup

Check standalone form route availability, supported loader modes and verification limits before embedding. Use a verified hosted form when the current iframe route is unavailable.

Current deployment availability

Verify the hosted form URL before installing this loader. In the production build checked on 15 November 2026, the default https://portal.appgram.dev/f/FORM_ID route returns Page Not Found. The dashboard host serves the direct /f/FORM_ID form page but blocks that route inside an iframe with AppGram can't be shown inside another site. Inline, modal and popup modes all depend on that iframe, so changing display mode does not resolve this deployment limitation.

Use a verified direct hosted form link or a form on a published portal page while the standalone embed route is unavailable. Do not tell visitors an embed is ready just because the CDN script loaded. The settings below describe the loader; confirm that your deployment serves and permits its frame before using them.

What you get

The forms widget is a lightweight loader for a single contact form. The form itself lives on your AppGram portal — the widget renders an iframe pointing at it, sized and styled for the host page, with cross-origin events forwarded back to your code.

The bundle is served from https://cdn.appgram.dev/forms.min.js (~30 KB gzipped).

Three display modes

  • Inline (default) — renders the form directly inside a container element you provide. Best for dedicated contact pages or embedding inside a landing-page section.
  • Modal — renders a centered overlay over the page when opened via the API. Best for a "Contact us" button in a navbar or hero.
  • Popup — renders a smaller positioned card (default bottom-right). Best for a persistent "feedback" launcher in the corner.

Install — inline mode

Add a container element to your HTML with a unique id, e.g. contact-form. Then drop a script tag pointing at https://cdn.appgram.dev/forms.min.js with these attributes:

src="https://cdn.appgram.dev/forms.min.js"
data-form="YOUR_FORM_ID"
data-container="#contact-form"

The iframe width defaults to 100%. The loader accepts an auto height, but automatic growth requires resize messages from the hosted renderer. Set and test an explicit height when that bridge is unavailable.

Install — modal mode

For modal / popup you don't need a container element. The widget creates an overlay on demand and opens it via the public API. Use the same script tag with these attributes:

src="https://cdn.appgram.dev/forms.min.js"
data-form="YOUR_FORM_ID"
data-mode="modal"

Then anywhere on the page, trigger it with a button: onclick="window.AppGramForms.open()". The widget is invisible until AppGramForms.open() is called. Use .close() to dismiss programmatically; clicking the backdrop also closes it.

Install — popup mode

Popup is like modal but smaller and corner-positioned. Use these attributes:

src="https://cdn.appgram.dev/forms.min.js"
data-form="YOUR_FORM_ID"
data-mode="popup"
data-position="bottom-right"

Settings reference

  • data-form / formId — Required. The form's UUID from your AppGram dashboard.
  • data-mode / mode (default "inline") — inline, modal, or popup.
  • data-container / container — CSS selector for the host element. Required for inline mode.
  • data-width / width (default "100%") — any CSS width, e.g. "480px".
  • data-height / height (default "auto") — any CSS height. auto resizes to the form's content.
  • data-theme / theme.mode (defaults to OS) — light or dark.
  • data-primary-color / theme.primaryColor — hex color with or without #.
  • data-position / position (default "center") — popup only: bottom-right, bottom-left, top-right, top-left, center.

Events and verification

The loader provides open/close controls and listens for hosted-frame ready, submit, error and resize messages. The checked standalone renderer sends a ready message but does not emit the submit/resize bridge events. Do not use a submit callback or automatic height as a guaranteed receipt. Check the form’s saved submission in AppGram and its destination integration instead. Test successful submission, validation errors and mobile overflow on the actual hosted URL.

Multiple forms on one page

Use distinct containers and explicitly manage separate instances when embedding multiple forms; do not assume a single global API addresses every form. If you need two forms inline on the same page, drop two script tags with different data-container selectors and the same or different data-form IDs.

Where to get the form ID

In the AppGram dashboard, open Forms, pick the form you want to embed, and copy the ID from the form's settings page. The form must be marked active to load successfully.

Actual default portal form iframe showing the current Page Not Found route limitation.

Example workspace in light mode. Sample data; follow the numbered callouts.

Direct hosted form rendering on the dashboard host, separate from iframe availability.

Example workspace in light mode. Sample data; follow the numbered callouts.

Was this article helpful?

Talk to sales

Tell us what you're running today and we'll map it onto AppGram.

A real human replies within one business day.