Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

JamesGuthrie/angular-schema-form-signature

Repository files navigation

Signature addon

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.

Installation

The easiest way is to install is with bower, this will also include dependencies:

bower install angular-schema-form-signature

Usage

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

Resulting Value

On submission, your model will contain a data URI representation of the signature which was input by the user.

Validation

The field will be valid as long as something has been entered. This prevents someone from not entering a signature.

Form Type Options

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.

Examples

Here's an example form declaration:

{
  key: 'signature',
  type: 'signature',
  width: 100,
  height: 100,
  resetButtonText: 'Clear signature'
}

Development

Install dev dependencies:

npm install

Install project dependencies:

bower install

Run gulp to generate output:

gulp

About

A signature pad field for angular schema form

Resources

License

Stars

Watchers

Forks

Packages

No packages published