Signing Form Web Component
The<docuseal-form> web component renders a fully functional signing form inside your application. Signers can view the document, fill in fields, draw signatures, and submit — all without leaving your page.
Quick start
Add the embed script and drop in the component:Attributes
The<docuseal-form> component accepts 39 data-* attributes to control behavior, pre-fill data, and customize the UI.
QuickSign recipe (2-click signing)
Combinedata-name on the embed with confirmation_modal mode on the
submission for a 2-click signing experience: ESIGN consent → signature
carousel → done.
Step 1 — Create the submission (server-side):
- ESIGN consent modal — “I Agree & Continue”
- Bottom-sheet carousel with 2 steps:
- Signature — auto-generated in Dancing Script cursive from
data-name, with REDRAW option - Initials — auto-generated from name initials (e.g. “JS”), with REDRAW option
- Signature — auto-generated in Dancing Script cursive from
- Each signature/initials value is applied to ALL fields of that type across all pages
- Pre-filled text fields render as read-only overlays on the document (visible but not editable)
- Redirect to
completed_redirect_urlafter submission
The carousel only triggers when ALL required non-signature fields have
values. If required text fields are empty, the form falls back to
field-by-field mode. Make sure to pre-fill all required fields via the
values parameter.Full HTML example
This example demonstrates every available attribute:Events
The<docuseal-form> component emits DOM custom events that you can listen to with addEventListener. Every event provides a detail property on the event object with relevant data.
init
Fired when the web component is initialized and the iframe begins loading.null
load
Fired when the iframe has loaded and the form is ready to render.null
loaded
Fired when the form content has fully rendered and is interactive.completed
Fired when the signer successfully submits the form.declined
Fired when the signer declines to sign the document.field-value
Fired each time the signer fills in or changes a field value.docutrust:resize
Fired when the form content height changes. Used internally by the web component to auto-resize the iframe. If you use a direct iframe, listen for this event to sync the iframe height. Event detail:React integration
Use the web component directly in React with aref for event handling:
Vue integration
Pre-filling fields
Usedata-values to pre-populate form fields. The JSON object maps field names (as defined in the template) to their values.
Signature, initials, image, file, and stamp fields cannot be pre-filled via
data-values. These require the signer to provide them interactively.Redirect after completion
Usedata-completed-redirect-url to send the signer to a custom page after they submit. DocuTrust appends query parameters to the URL so your application can identify the completed submission.
postMessage events
When the signing form is embedded in an iframe (either via the web component or a raw<iframe>), the form communicates with the parent window via
postMessage. Listen for these events to react to signing lifecycle changes
without polling.