Jump to
↵select↑↓navigateescclose

Configuration

Every setting eSign Web Forms reads, on Web Form, Email Template and the site, the permissions it checks, and everything the app adds to a site.

Updated
On this page

eSign Web Forms has no settings page of its own. Each web form carries its own eSign settings, an email template is marked for eSign with one check box, and a few standard Frappe settings decide the rest. This page lists them all, then lists everything the app adds to your site. For the steps in order, see Set up a signing web form.

Web Form

The eSign fields appear on the Web Form form. Enable eSign sits below Login required; the three sections below show only while it is ticked. Every check box is unticked by default.

SettingSectionWhat it does
Enable eSignTop of the formTurns the web form's edit page (/<ROUTE>/<DOCUMENT>/edit) into a signing page. Saving the web form with it ticked also ticks Allow editing after submit, which the signing page needs.
Submit on ResponseeSign SettingsSubmits the document when it is signed, if its DocType is submittable and it is still a draft.
Only allow Signing on MobileeSign SettingsOn large screens, shows a QR code that opens the same page instead of the form. See Sign on a phone.
Set Property After ResponseeSign SettingsA field of the document to set when it is signed. Only Select, Link, Data and Text fields are offered, and saving the web form with any other type is refused.
Value To Be SeteSign SettingsThe value written to that field, for example Signed.
Signer Name FieldSignerThe form field the signer types their name into. Its value is recorded as the signer's name. Only the web form's own Data fields are offered. Empty: only a logged-in user signing as themselves is named, after their own User.
Signer Email FieldSignerThe form field the signer types their email into. A valid address in it is recorded as the signer's email, and the link's email parameter pre-fills it. Only the web form's own Data fields are offered. Empty: the email comes from the link, or a Data field whose options are Email.
Require Verified EmailSignerSigns only through a link bound to its recipient, and locks the email field to the bound address. See Verified email.
Consent TextSignerThe text of the consent checkbox the signer must tick. Empty: "I agree to sign this document electronically."
Send Notification on ResponseNotification SettingsSends a Notification after signing, with the signed PDF attached and the audit trail added to the message.
NotificationNotification SettingsThe Notification to send. Only enabled Notifications of the web form's DocType whose Send Alert On is Custom are offered, and only those whose Channel is Email are sent.

The signing page also uses these standard Web Form fields:

FieldUsed for
Select DocType, Route, PublishedWhich documents the form signs and the address of the signing page. Send for eSign offers only published eSign web forms of the DocType.
Web Form FieldsThe fields the signer fills in. Add the Signature field here.
Print FormatThe format of the preview and of the signed PDF. Shown while Enable eSign or Allow print is ticked. Empty: Frappe's standard format.
IntroductionShown under the title of the signing page until the document is signed.
Submit button labelThe label of the submit button. Empty: Sign & Submit.
Success title, Success message, Success URLThe card shown after signing, and the page the signer is sent to five seconds later. Empty: Submitted and "Thank you for signing this document."
Allow incomplete formsLets a signer submit without the mandatory fields, as on any web form.
Show attachmentsLists the document's attachments under the form. A guest sees only the public ones, as on any Frappe web form. Frappe shows this check box only while Login required is ticked.

Email Template

SettingWhat it does
eSign RequestOffers the template in the Send for eSign dialog, which lists only templates with it ticked. The subject and message are rendered with the document, as Frappe renders any email template.

Site settings

SettingWhereWhat it does
Document Share Key Expiry (in Days)System SettingsHow long a signing link works. Each link carries a Frappe Document Share Key, which expires after this many days (30 by default; Frappe uses 90 when it is empty).
Outgoing Email AccountEmail AccountThe From of the Send for eSign dialog. It picks the default outgoing account, or the only one there is. When the document has a Company, it offers only that company's accounts (ERPNext adds Company to Email Account).
encryption_keysite_config.jsonThe secret that recipient-bound links are signed with, through a key derived from it. Frappe creates it on first use. Changing it invalidates every bound link sent before.
Send Print as PDFPrint SettingsMust stay ticked, as it is by default. Frappe's attach_print, which renders the signed copy, makes an HTML file instead of a PDF when it is unticked, and the signing page then finds no signed PDF to show or download.
Background workersThe benchThe signed PDF, the audit record and the notification are written by jobs on the short queue.

Permissions

The app adds no roles. It checks these permissions:

ActionWho may do it
Send a request with Send for eSignAnyone with Email permission on the document, as for Frappe's own email dialog. The button shows to anyone who opens the form when the DocType has a published eSign web form, and the link preview and sending check the permission.
Open the signing page, its preview and the signed PDFAnyone holding the link's valid share key, signed in or not. Without a key: a signed-in user the web form admits (the document's owner, website permission, or document permissions when the web form applies them), or a user with read or print permission on the document.
Sign an existing documentAnyone holding the share key, or a signed-in user with the web form's write permission or write permission on the document. With Require Verified Email, only through a link bound to its recipient.
Download the signed PDF without a keySigned-in users only, with the permissions above. A guest always needs the key.

The signing endpoints are rate limited per IP address: signing 10 times a minute and the preview 30 times a minute per web form, and the signed PDF download 20 times a minute.

For developers

Choose which documents can be signed

By default a document can be sent for eSign when its DocType has a published eSign web form. An app can decide per document with a can_esign hook in its hooks.py: a map of DocType to methods that take doc and return a boolean. When a DocType has such methods, every one of them must return true, and the web form check is not made.

can_esign = {"Quotation": ["my_app.esign.can_esign_quotation"]}

Steer the dialog

A form script can define get_email_account(frm, fieldname) and get_email_recipients(frm, fieldname) form events on its DocType. The Send for eSign dialog uses the Email Account and the list of addresses they return instead of its own defaults.

get_esign_link(doc, web_form_name, print_format_name, recipient_email) is available in Jinja (print formats, notifications, email templates) and as a whitelisted method. See Links in your own templates.

What the app adds to your site

This is the complete list, so you can see what installing or migrating changes.

Fields and property setters

DocTypeChange
Web FormEnable eSign (esign_enabled) after Login required. After Allow delete, three sections shown only with eSign enabled: eSign Settings (esign_submit_on_response, esign_force_mobile, esign_update_field, esign_update_value), Signer (esign_signer_name_field, esign_require_verified_email, esign_signer_email_field, esign_consent_text) and Notification Settings (esign_send_notification, esign_notification).
Web FormA property setter on Print Format: shown when esign_enabled or allow_print is set.
Email TemplateeSign Request (esign_request) after Subject, and a Message Template section break.
CommunicationeSign added to the Communication Type options, through a property setter.

Behavior

WhereChange
Web Form controllerExtended with extend_doctype_class: the signing page's context, the share-key access check, and the validation of the eSign settings.
Email Template controllerExtended with extend_doctype_class, to carry the eSign Request field.
Web Form formA doctype_js script that fills the Set Property After Response, Signer Name Field and Signer Email Field options and filters Notification.
Every desk formThe Send for eSign button, on forms where can_esign says yes.
Desk controlsThe Signature control (draw, type, upload) and the upload and font controls it uses replace Frappe's, through bundles loaded on every desk page, with the four signature fonts.
TimelineAn additional_timeline_content hook for every DocType, which shows each eSign Communication as a card.
JinjaThe get_esign_link method.
Background jobsattach_print_to_document and record_signature, queued on short after each signing. The app has no scheduled jobs.

Endpoints

MethodWho may call itDoes
esign_webforms.esign.can_esignSigned-in usersSays whether the Send for eSign button shows
esign_webforms.esign.send_esign_email (POST)Users with email permissionSends the signing request
esign_webforms.esign.custom.web_form.get_esign_web_formsSigned-in usersLists a DocType's published eSign web forms
esign_webforms.esign.custom.web_form.get_esign_linkUsers with email permissionReturns a signing link, never bound to a recipient
esign_webforms.esign.custom.email_template.get_esign_email_templatesSigned-in usersLists the email templates with eSign Request ticked
esign_webforms.esign.custom.web_form.get_print_htmlGuests with the key, and usersThe document preview of the signing page
esign_webforms.esign.custom.web_form.acceptGuests with the key, and usersSigns: saves the form, then queues the PDF and the audit record
esign_webforms.esign.custom.web_form.download_signed_pdfGuests with the key, and usersServes the latest signed PDF and writes an Access Log entry

The same methods under the app's old esign.* paths are mapped to these by override_whitelisted_methods.