Render embedded web form instances
The Web Forms API is available in all developer accounts, but only in certain production account plans. Contact Docusign Support or your account manager to find out whether the Web Forms API is available for your production account plan.
Note: This topic applies only to web form instances that are embedded in a web application or displayed via a redirect to the Docusign platform. The information does not apply to remote web form instances. See When to use embedded or remote web form instance delivery for information about the delivery methods.
Your application has two options for rendering web form instances:
- Use the Docusign JS client SDK library to embed web form instances in the web application.
- Redirect users’ browsers to web form instance URLs.
Regardless of which option you choose, your application must use the Web Forms API Instances:createInstance API request or an equivalent server-side SDK method call to create web form instances before rendering them.
Use Docusign JS to render web form instance URLs
Docusign JS is a JavaScript client SDK that enables you to embed web form instances in your web application. Docusign JS creates an iframe in which the web form instance is displayed and loads the web form instance URL that your application passes to it. You can access the Docusign JS libraries here:
- Developer environment: https://js-d.docusign.com/bundle.js
- Production: https://js.docusign.com/bundle.js
Docusign JS features include:
- A unified experience for users that makes the web form instance appear as if it’s hosted on your website
- A focused view display of the envelope that Docusign generates after a user submits a web form instance, if the instance was created from a template-based web form configuration. Focused view eliminates some of the Docusign signing UI components, further contributing to a seamless user experience. Focused view is not available if the web form configuration Initiate signing session from email setting is enabled.
- Display customization options that can be set using the webFormOptions object
- The ability to apply any CSS style property to the iframe, such as width, height, and border size
- Form and envelope events that your application can use to trigger actions
Although it is possible to create your own iframe and embed the web form instance URL in it, Docusign recommends using Docusign JS instead. Without it, your application will not be able to take advantage of its display customization options or focused view.
webFormOptions object
The Docusign JS webFormOptions object enables you to customize the web form instance display in your web application and define other settings. The properties of webFormOptions are listed below. See How to create and embed a web form instance for sample code that includes a webFormOptions object.
Form and envelope events
Docusign JS enables you to set up listeners that can receive these events. See How to create and embed a web form instance for sample code that includes listeners.
Redirect to web form instance URLs
For this option, your application constructs web form instance URLs and redirects users’ browsers to them. Users will see that they are being routed from your website to the Docusign platform, which displays the web form instances. See Form submission after a redirect to the Docusign platform for a description of what happens after a user submits a web form instance.
Next steps
- Learn more about web form instance expiration.
- Read about your options to redirect users after form submission.