Embeddable forms script

Use the cross-origin forms script safely.

The embeddable forms script lets external pages submit to Mini Agency form endpoints while keeping validation and submission storage centralized.

When to use it

Use the script when a form is rendered outside the Mini Agency public renderer but should still create Mini Agency submissions. Common cases include a custom landing page, a partner site, or a static export that needs to keep form capture active.

Requirements

Each embedded form needs enough information to identify the target site and form. Keep those identifiers stable. Do not depend on visible labels for routing submissions.

A typical embed includes:

<script src="https://app.miniagency.ai/paper3-forms.js" defer></script>
<form data-miniagency-form data-site-id="site_uuid" data-form-id="contact">
  <input name="email" type="email" required />
  <textarea name="message" required></textarea>
  <button type="submit">Send</button>
</form>

Use the exact attributes provided by the app when copying embed instructions. The example above shows the shape, not a substitute for your site's generated values.

Cross-origin behavior

The script submits to the app origin. The server validates origin, site, form identity, field shape, and spam controls. If the page is hosted on another origin, make sure the production domain is expected by the form configuration.

Validation and errors

Client-side required fields improve user experience, but server validation is authoritative. Handle error states in the page so visitors are not left without feedback when a network or validation error occurs.

Testing checklist

  • Submit a valid entry from the external page.
  • Submit with required fields missing.
  • Confirm the submission appears in Mini Agency.
  • Confirm success copy or redirect behavior.
  • Test from the final production domain, not only localhost.

On this page