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.
Changelog
Section titled “Changelog”3.0.0 Latest
Section titled “3.0.0 ”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() |
dataRequestId | signatureRequestId |
dataRequestURL | signatureRequestURL |
onRemainingDataRequests | onRemainingSignatureRequests |
waitingForDataRequestsTitle | waitingForSignatureRequestsTitle |
waitingForDataRequestsMessage | waitingForSignatureRequestsMessage |
The iframe’s name="dsp-data-request" | name="dsp-signature-request" |
The iframe’s data-data-request-id attribute | data-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
httporhttpsURL.
Removed:
DocSpring.setField(),DocSpring.submitForm(), and thedefaultFormDataandstaticFormDataoptions. A signature request’s values come only from its submission: send them when you create the signature request. The options throw an error.- The
domainVerificationoption, 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: falseno 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_failedordecline_failed, with the HTTPstatus. 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 ofload_timeoutafter 30 seconds. - Anything else:
unknown_error.
Released on Oct 20, 2026
- Added the
allowSkippingOptionalFieldsoption, 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_timeouterror (onErrorand 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 amessage_timeouterror either. - Forms opened with
dataRequestURLnow add the library’s version to the URL, as forms opened withdataRequestId,tokenIdandtokenSecretdo. - 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_timeouterrors are no longer reported for messages the form did receive. closeModalOnClickOverlay: falsenow applies to its form even when the page opened another form before it.DocSpring.closeModal()closes every modal form, andclearForm,submitForm,focusField,focusNextField,setFieldandreturnToFormact 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 withcloseModalOnSave: truenever calledonProcessedor redirected.onProcessedis now called when the form redirects to a redirect URL. The redirect follows one second later, so the callback has time to finish, even ifcloseModalOnProcessedcloses the modal. Older versions redirect without callingonProcessed.- 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
onRemainingDataRequestsis 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.declinedandsubmission.declinedwebhook events. See Declining to Sign.showDecline: falsehides the button.declineButtonLabelchanges its label (for example,"Cancel - Do Not Sign").onDeclineis 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
declinedstate: 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
AUregion option. The AU region has been shut down, soregionnow acceptsUSorEU.
Released on Jun 25, 2026
- Added
region,host,appHost, andapiHostoptions for configuring US, EU, AU, and enterprise deployments. - Fixed preconfigured
DocSpring.appHost,DocSpring.host,DocSpring.scheme, andDocSpring.portvalues 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
footerHTMLoption that allows you to configure content for a custom footer.
Released on Apr 25, 2020
- For inline iframes: Changed default
iframestyle todisplay: block; min-height: 500px;. (display: blockremoves any space at the bottom of inline iframes.) - Added
iframeClassandiframeStyleoptions, so that you can configure theclass=""andstyle=""attributes on theiframeelement. (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
Why is this library updated less often?
Section titled “Why is this library updated less often?”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.