This addon renders a signature pad in a form field, allowing someone to electronically enter their written signature. The resulting signature image is stored as a data URI in the model field.
The easiest way is to install is with bower, this will also include dependencies:
bower install angular-schema-form-signature
You will need to specify the signature
dependency in your app definition, this
is for the angular signature
module.
angular.module('yourModule', ['schemaForm', 'signature']);
The signature add-on adds a new form type, signature
.
Form Type | Becomes |
---|---|
signature | a signature widget |
On submission, your model will contain a data URI representation of the signature which was input by the user.
The field will be valid as long as something has been entered. This prevents someone from not entering a signature.
The signature
form only supports setting the width, height and the text of the reset button.
If you would like an option to be present, open an issue or pull request for it.
Here's an example form declaration:
{
key: 'signature',
type: 'signature',
width: 100,
height: 100,
resetButtonText: 'Clear signature'
}
Install dev dependencies:
npm install
Install project dependencies:
bower install
Run gulp to generate output:
gulp