AgentStack Docs

Custom Form

Render a host-defined, client-validated form inline in the live chat widget.

If a conversation needs structured information that a host site defines and receives, use Custom Form. Configure a unique Form Name and a clear When to use this form instruction. On the embedding page, register a matching name with window.agentstack.registerFormSchema(...). That host callback supplies the fields, labels, submit-button text, and outcome messages for the form.

The dashboard does not store the field schema. On a live site, the widget requests the schema from the host. It renders the form, validates it client-side, and posts submitted values back to the host page. A submitted form also dispatches a form.submitted webhook. Webhook delivery is asynchronous. A downstream delivery problem does not change the on-screen result that the visitor sees.

Custom Form is low risk and widget-only. It needs a live host page. Playground and Compare show only a static preview, because they cannot provide your registered schema. Test the complete interaction on the embedding site, including validation and your receiver. Do not present the form mechanism as a general authentication system. Do not assume server-side validation of a host-defined schema.