Skip to content

Signature Requests JS Library

This client-side JavaScript library allows you to embed a signing form on your own website to collect legally binding electronic signatures and generate signed PDFs.

You can also get these release notes by email. They include changes to the Visual Forms library, which shows the signing form inside the Signature Requests iframe.

Released on Oct 26, 2026

Data Requests JS is now Signature Requests JS, at https://cdn.docspring.com/embed/signature_request.v3.0.0.js. To upgrade from 2.x, rename:

2.x (Data Requests JS)3.0.0 (Signature Requests JS)
DocSpring.createVisualForm() (or createForm())DocSpring.createSignatureRequestForm()
dataRequestIdsignatureRequestId
dataRequestURLsignatureRequestURL
onRemainingDataRequestsonRemainingSignatureRequests
waitingForDataRequestsTitlewaitingForSignatureRequestsTitle
waitingForDataRequestsMessagewaitingForSignatureRequestsMessage
The iframe’s name="dsp-data-request"name="dsp-signature-request"
The iframe’s data-data-request-id attributedata-signature-request-id
  • An option with its old name throws an error that gives the new name.
  • The signing form opens at /signature_requests/ instead of /data_requests/. The old links still work.
  • Sends messages to the signing form only while the form is on DocSpring’s page.
  • Follows a redirect from the signing form only to an http or https URL.

Removed:

  • DocSpring.setField(), DocSpring.submitForm(), and the defaultFormData and staticFormData options. A signature request’s values come only from its submission: send them when you create the signature request. The options throw an error.
  • The domainVerification option, which throws an error. A live signature request only loads on the sites in the template’s Embed Domains setting: DocSpring tells the browser which sites may show it, and the browser refuses to show it anywhere else. A test signature request loads on any site. This applies to pages that load 2.x too: domainVerification: false no longer lets them show a live signature request on a site that isn’t listed.

onError always gets an object with an error code and a message (see Errors):

  • An expired signing link calls it with token_expired, and the other errors from the signing form have their own codes (invalid_token, signature_request_completed, …). 2.x passed the message as a string.
  • A failed save or decline: save_failed or decline_failed, with the HTTP status. 2.x passed the error as a string.
  • A PDF that couldn’t be generated: processing_failed. A PDF that takes more than a minute: processing_timeout, once, while the form keeps waiting. 2.x passed nothing, every second after the first minute.
  • A signing form the browser refused to show: frame_blocked, a few seconds after the iframe loads, instead of load_timeout after 30 seconds.
  • Anything else: unknown_error.

Released on Oct 20, 2026

  • Added the allowSkippingOptionalFields option, which shows the Continue button as soon as every required field is filled in. It overrides the template’s Show Continue Once Required Fields Are Filled In setting.
  • The signing form’s other improvements in Visual Forms JS 2.16.0 (keyboard use, field errors from rejected submissions, required field colors), and the template’s Show Continue setting, apply to every 2.x version of Data Requests JS, because the form runs on DocSpring’s own page.

Released on Oct 18, 2026

  • Fixed the load_timeout error (onError and the error report) for forms that had loaded. It happened when a page opened more than one form, closed the modal before the form loaded, or removed an inline form before it loaded. Removing a form while it loads no longer reports a message_timeout error either.
  • Forms opened with dataRequestURL now add the library’s version to the URL, as forms opened with dataRequestId, tokenId and tokenSecret do.
  • Fixed pages with more than one form: each form now only handles its own messages, so replies no longer go to the wrong form, and message_timeout errors are no longer reported for messages the form did receive.
  • closeModalOnClickOverlay: false now applies to its form even when the page opened another form before it.
  • DocSpring.closeModal() closes every modal form, and clearForm, submitForm, focusField, focusNextField, setField and returnToForm act on the most recently opened form that is still open.
  • DocSpring.closeModal() no longer stops an inline form’s callbacks. Before, it removed the most recently opened form’s message listener even when that form was inline, so an inline form with closeModalOnSave: true never called onProcessed or redirected.
  • onProcessed is now called when the form redirects to a redirect URL. The redirect follows one second later, so the callback has time to finish, even if closeModalOnProcessed closes the modal. Older versions redirect without calling onProcessed.
  • On templates with “Public” submission privacy, a signer who isn’t the last to sign is now redirected to the redirect URL, one second after onRemainingDataRequests is called. Before, the form stopped at a message saying it was waiting for the other signers. If the page closes the form before then (for example to show the next signer’s form), the form doesn’t redirect. This applies to every 2.x version of Data Requests JS.

Released on Oct 13, 2026

  • Added a Decline button to the form header, so a signer can decline to sign instead of signing. Declining cancels the whole submission: no PDF is generated, and DocSpring sends the submission_data_request.declined and submission.declined webhook events. See Declining to Sign.
    • showDecline: false hides the button.
    • declineButtonLabel changes its label (for example, "Cancel - Do Not Sign").
    • onDecline is called when the signer declines.
  • If you read submissions or data requests with a DocSpring API client, upgrade it before you upgrade to this version. These versions support the new declined state: Ruby 3.3.0, Python 3.1.0, PHP 3.1.0, Java 3.1.0 and C# 3.3.0. Older versions of these clients raise an error when they read it.

Released on Aug 28, 2026

  • Removed the AU region option. The AU region has been shut down, so region now accepts US or EU.

Released on Jun 25, 2026

  • Added region, host, appHost, and apiHost options for configuring US, EU, AU, and enterprise deployments.
  • Fixed preconfigured DocSpring.appHost, DocSpring.host, DocSpring.scheme, and DocSpring.port values being overwritten when the library loads.

Released on Jun 24, 2026

  • Fixed the signature modal drifting off-screen when pinch-zooming on mobile devices. The parent page now notifies the embedded signing form whenever its visual viewport changes (e.g. pinch-to-zoom or pan), so the signature modal can reposition itself and stay in view.

Released on Jul 19, 2024

  • Improved support for mobile devices and tablets.
  • Improved logic for injected CSS when adding iframe to page.

Released on Aug 2, 2023

  • Added DocSpring.setField(name_or_id, value) function to set the value of a field.
  • Fixed DocSpring.focusField(name_or_id) function. You can now focus a field by name or numeric ID.

Released on Apr 6, 2021

  • Added a footerHTML option that allows you to configure content for a custom footer.

Released on Apr 25, 2020

  • For inline iframes: Changed default iframe style to display: block; min-height: 500px;. (display: block removes any space at the bottom of inline iframes.)
  • Added iframeClass and iframeStyle options, so that you can configure the class="" and style="" attributes on the iframe element. (Available for both modal and inline iframes.)

Released on Apr 25, 2020

  • Fixed crash for any browsers configured to block all cookies. Before this fix, the loading spinner would sometimes get stuck and the signing iframe would fail to load.

Released on Apr 24, 2020

  • Improved logging and error reporting to investigate iframe loading issues

Released on Apr 2, 2020

  • Fixed bug where static form data could not be overridden after clearing a field

Released on May 20, 2019

  • Renamed FormAPI to DocSpring

The Data Requests library is a short piece of code that inserts our secure signing iframe into a webpage and provides a JavaScript API to interact with the iframe, so it doesn’t need to be updated very often. The signing experience inside the iframe uses our Visual Forms library.