Post Closed
57
Views
2
Comments
[Signature] Return strokes using Signature
Question
signature
Web icon
Forge asset by Signature Team

Is it possible to record the strokes made by the users? The movement on x and y co-ordinates I mean.

2020-02-28 09-46-54
Eduardo Jauch

Hum...

You mean, using the Signature component?
As it is, no, it isn't.

Cheers,
Eduardo Jauch

2020-03-05 14-29-02
José Costa

Hi Saurav,

To get the strokes, you need to modify the Component:

  • Open the Signature module
  • Edit the Javascript property of the jSignature webblock
  • In the line where it is:
$('#' + this.textbox).val(this.signObj.jSignature('getData'));

change it to 

$('#' + this.textbox).val(this.signObj.jSignature("getData", "svgbase64"))
  • That will get you the strokes instead of the image
  • Publish it and use it in your module

Disclaimer: 

I have not tried it. I'm basing the above information on the documentation for the jSignature jQuery plugin:

https://willowsystems.github.io/jSignature/#/about/

You can also get other type of data besides the bitmap or the svgbase64 (see the above link).

Cheers,

José