Documentation Index
Fetch the complete documentation index at: https://docs.spitshake.io/llms.txt
Use this file to discover all available pages before exploring further.
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.
| Attribute | Type | Default | Description |
|---|---|---|---|
data-src | string | required | Signing form URL. Format: https://your-app.com/s/SLUG where SLUG is the submitter’s unique signing slug. |
data-email | string | — | Pre-fill the signer’s email address. When provided, the email step is skipped. |
data-name | string | — | Pre-fill the signer’s display name. When the submission uses quick_sign_mode: "confirmation_modal", this name is also used to auto-generate a cursive signature (Dancing Script font) and initials in the signing carousel. |
data-role | string | — | Target a specific submitter role (e.g., "Recipient", "Witness"). Required when the submission has multiple roles sharing the same email. |
data-preview | "true" | — | Enable preview mode. The form renders all fields but disables submission. Useful for showing a read-only view of the document. |
data-language | string | — | UI language code. Supported values: "en", "es", "fr", "de", "pt", "it", "nl", "ja", "zh", "ko", "ar", "he". |
data-with-title | "false" | "true" | Set to "false" to hide the template title at the top of the form. |
data-with-send-copy-button | "false" | "true" | Set to "false" to hide the “Send a copy” button that lets the signer email themselves a copy. |
data-with-download-button | "false" | "true" | Set to "false" to hide the download button on the completion screen. |
data-allow-to-resubmit | "true" | "false" | Set to "true" to allow the signer to resubmit the form after initial completion. |
data-go-to-last | "true" | — | When set, the form automatically scrolls to the last incomplete field on load. Useful for returning signers who previously started filling out the form. |
data-skip-fields | string | — | Comma-separated list of field names to skip. Skipped fields are hidden from the signer and not required. Example: "Internal Notes,Manager Approval". |
data-values | JSON string | — | Pre-fill field values as a JSON object. Keys are field names, values are the pre-filled content. Example: '{"Full Name": "Jane Doe", "Company": "Acme Inc"}'. |
data-metadata | JSON string | — | Attach custom metadata to the submission as a JSON object. Metadata is returned in webhook payloads and API responses. Example: '{"customer_id": "cust_8472", "deal_id": "deal_291"}'. |
data-readonly-fields | string | — | Comma-separated list of field names to render as read-only. The signer can see the value but cannot edit it. Example: "Contract Amount,Start Date". |
data-completed-redirect-url | string | — | Absolute URL to redirect the signer to after successful submission. The URL receives query parameters submitter_id and submission_id. |
data-expand | "true" | — | Expand the form iframe to its full content height, eliminating internal scrolling. The form integrates seamlessly into the page layout. |
data-minimize-first-step | "true" | — | Collapse the first step (usually email/name entry) into a compact bar. The signer clicks to expand it. Useful when you pre-fill email/name and want to reduce visual noise. |
data-autoscroll | "false" | "true" | Set to "false" to disable automatic scrolling to the next field after the signer completes one. |
data-external-id | string | — | Link the signer to an external ID in your system. The value is stored on the submitter and returned in webhook payloads and API responses. |
data-token | string | — | JWT token for authentication. Use this instead of data-src when you generate a signing token server-side via POST /api/embed/token with audience: "form". |
data-logo | string | — | URL to a custom logo image displayed at the top of the signing form. Overrides the account-level logo. |
data-i18n | JSON string | — | Custom i18n key overrides as a JSON object. Allows you to replace specific UI strings in the signing form. Example: '{"submit": "Confirm & Sign", "next": "Continue"}'. |
data-with-decline | "true" | — | Set to "true" to show a “Decline” button, allowing the signer to decline the document. Fires the declined event when clicked. |
data-with-field-names | "false" | "true" | Set to "false" to hide field labels/names above each input in the signing form. |
data-with-field-placeholder | string | — | Show placeholder text inside empty fields. The string value is used as the placeholder for text-type fields. |
data-with-complete-button | "false" | "true" | Set to "false" to hide the complete/submit button. Useful when you want to control submission programmatically. |
data-only-required-fields | "true" | — | When set to "true", only required fields are shown to the signer. Optional fields are hidden. |
data-allow-typed-signature | "false" | "true" | Set to "false" to disable the typed signature option in the signature pad. Only drawn and uploaded signatures will be available. |
data-signature | string | — | Pre-fill the signature field with a base64-encoded image (data:image/png;base64,...), an image URL, or plain text (rendered as a typed signature in cursive). Directly sets the signature value — bypasses the carousel. For the 2-step QuickSign carousel UX, use data-name with confirmation_modal mode instead. |
data-send-copy-email | "false" | "true" | Set to "false" to disable the option for the signer to send themselves a copy of the signed document via email. |
data-order-as-on-page | "true" | — | When set to "true", fields are ordered by their position on the page (top to bottom, left to right) rather than the order defined in the template schema. |
data-background-color | string | — | Background color for the signing form as a HEX code (e.g., "#f3f4f6"). Overrides the default white background. |
data-custom-css | string | — | Custom CSS rules injected into the signing form iframe. Allows overriding default styles for advanced branding. Example: "body { font-family: 'Inter', sans-serif; } .field-label { color: #1e3a5f; }". |
data-completed-message-title | string | — | Custom title displayed on the completion screen after the signer submits. Replaces the default “Document signed” heading. Example: "Thank you for signing!". |
data-completed-message-body | string | — | Custom body text displayed on the completion screen. Replaces the default completion message. Supports basic HTML. Example: "Your signed document will be emailed to you shortly.". |
data-completed-button-title | string | — | Custom text for the button on the completion screen. Replaces the default button label. Example: "Return to Dashboard". |
data-completed-button-url | string | — | Custom URL for the completion screen button. When set, clicking the button navigates to this URL instead of the default behavior. Example: "https://your-app.com/dashboard". |
data-minimize | "true" | — | When set to "true", field panels are always minimized (collapsed). The signer clicks on a field area to expand it. Reduces visual clutter on documents with many fields. |
data-autoscroll-fields | "false" | "true" | Alias for data-autoscroll. Set to "false" to disable automatic scrolling to the next field after the signer completes one. |
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.
| Field Type | Value Format | Example |
|---|---|---|
text | String | "Jane Doe" |
date | ISO date string | "2026-04-08" |
number | Numeric string | "150000" |
checkbox | "true" or "false" | "true" |
select | Option value string | "Option B" |
radio | Option value string | "Yes" |
phone | E.164 format | "+14155551234" |
cells | String (one char per cell) | "ABC123" |
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.
| Parameter | Description |
|---|---|
submitter_id | The ID of the submitter who just completed signing |
submission_id | The ID of the parent 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.
| Event | Fired when | Payload |
|---|---|---|
docutrust:loaded | The signing form iframe has loaded and is ready. | { submitter: "slug" } |
docutrust:completed | The signer has submitted all fields successfully. | { submitter: "slug" } |
docutrust:declined | The signer declined to sign. | { submitter: "slug" } |
docutrust:field-value | A field value changed (useful for live sync). | { field_uuid, value } |
docutrust:resize | The iframe content height changed (for auto-sizing). | { height: 1200 } |