Signature text queried from a database table, populated into a textarea, and then injected with dSig (readonly mode) |
|
|
Instructions:
-
Download dSig and link the JS and CSS files to your application, as well include JQuery
(3.3.1 tested)
-
Inject dSig into any textarea html tag:
$("#yourTextareaId").dSig();
-
Your users can now use a mouse or touch screen to sign, or they can upload an image of their signature
as well.
-
On page post, get the digital signature data from your textarea just like you would get text from a
posted textarea. The data will be a large string of text. You can simply save this text in any database
table text field. Please remember, when dealing with signatures, adequate security should be applied to
this data based on your application's policies.
-
To render a signature, get the text from your datatabase table as you would any other data, populate a
textarea with the text, and then inject dSig into the textarea. Additionally, include the readonly
option to handle if the signature cannot be changed:
$("#yourTextareaId").dSig(
{
"readonly":1
}
);
-
All dSig options:
$("#yourTextareaId").dSig(
{
"width":"in pixels", // default is 595px
"height":"in pixels", // default is 150px
"color":"in HEX code RGB", // default is #222222
"line":number, // default is 1 - this is thickness (line width) of the signature
"text":"alpha-numeric", // default is shown in the first example on this page
"readonly":0 or 1, // default is 0 for write
"hideBorder":0 or 1, // default is 0 for show border
"allowUpload":0 or 1 // default is 1 for allow
}
);
-
For initials:
$("#yourTextareaId").dSig(
{
"text":"alpha-numeric", // required to not have a long string of text instead
"initials":1 // default is 0 for signature setup
}
);
|