Drawn signature HTML Field

@spa Actually not yet, 'cos i was a bit hesitant to look deeper into Erpnext form field code. But will start this weekend because it is quite interresting.

Maybe i will aim for similar simple POC as above first. Then you guys can help chip in with idea on how to make it a valid digital signature later ?


great, yes I agree - on the long run we should consolidate drawn and digital signature function.
I think having the option to choose what kind of documents are signed what way is vital - maybe by using workflow?

  • Delivery note - drawn signature

  • Sales order / contract under 3000€ (or dollar or whatever) - drawn signature

  • Sales Order / contract over 3000€ (or dollar or whatever) - digital signature (PKI)


so I think of the following milestones

  1. implement the drawn signature field
  2. implement further identification measures for the drawn signature (tbd)
  3. implement workflows like dokument status changing when signed
  4. gather informations about PKI (@woakes070048 paper is a very good start) and ERPNext mechanisms and how to combine the two (think we will need a new doctype for that wich holds the public keys of signees on customers side as well as private and public keys of employees) - although I am a bit concerned about security when storing such sensetive data in the DB wich is accessible from the Web
  5. implement PKI on the inter company side
  6. implement workflow decisions - what document to sign how
  7. testing of security measures (pentesting) - if successful…
  8. implement PKI for customer side

this list is not exhaustive and everyone is welcome to add to it

@woakes070048 what do you think? any comments?

Guys, @spa, @woakes070048, @rmehta

Some progress here: - Add controller for signature field, including buttons for save and … · frappe/frappe@8b3de87 · GitHub
So far i’ve been able to add the jSignature field, the buttons and all are working well on client. Currently only add it into Custom Field’s field type. So you can just add a custom Signature field into any DocType.

Some visuals:

However, I still have some problems with the saving part on server. The value did not get saved when I press Save on the Doctype even though it exists on client cur_frm.doc.custom_field. So definitely need to change some other parts on server side but can’t figure out where should I do that.

@rmehta: I have 2 questions on this:

  1. Can you give some advise on which part of the code base to look at (for saving a custom field type, both for using in Doctype and in Custom Field)?

  2. I’ve came across this file frappe\templates\generators\web_form.html and it seems relevant to render the field. But once I’ve changed it, seem like there is no effect anywhere. So what was it used for ? Should we change this to something similar to the ‘ControlSignature’ ?

Thank you!


Hi @nathan_dole

this looks awesome, good job

@nathan_dole can you start a pull request. Not able to track where your code is!

okay, here it goes https://github.com/frappe/frappe/pull/2433

1 Like

guys any advise on this yet ? Wanna finish this soon.

Yo guys, got it working here. Apparently, it didn’t work because frappe does not know what the new Field Type should be translated into. So, just for sharing, i’ve added this in frappe/model/db_schema.py:

        ,'Read Only':	('varchar', varchar_len)
	,'Attach':		('text', '')
	,'Attach Image':('text', '')
        ,'Signature':	('longtext', '')

So if you’ve tried it out before, remove all Custom field with that type cos it will not get created.
I hope it can be merged quickly and then you guys can continue to contribute to make it better.


Great work. Very helpful for signed deliveries.

Guys, @spa, @woakes070048, @rmehta
've been a while since the PR was created but still no review ? Although I just realized it lacks printing part and some other issue with Editability. But some progress will be good.

hi @nathan_dole

sorry about this I cant really help there as I am not a reviewer but I have seen that @netchampfaris got assigned as a reviewer…

Also it will take me a bit to get a dev maschine as our company swiched to master end of last year to go into production
I recon I will have a dedicated dev environment back by the end of this month

Hello @nathan_dole , tried it but can’t see the Signature in Select

Did I miss something?

Hi please try using the version on the pull request or my fork. The previous version might only allow custom field, not.standard

1 Like

Is ok now got it working, I put it in DocField aside from Custom Field. This is a good feature :slight_smile:

Hello Gurus,

Noobish question, I have use for this feature, is it part of the main fork? I used bitnami app to get started with ERPNext. How can I get it working with that as my starting point?


1 Like

It’s already a standard field type in erpnext now. You can use it as sny other field type (like add custom type)

Can u explain how u got it working please?