JourneyApps Legacy Docs
Return to JourneyApps Docs
  • UI Components
    • button (v1) (deprecated)
    • button (v2) (deprecated)
    • capture-coordinates (legacy docs)
    • capture-file (legacy docs)
    • capture-signature (legacy docs)
    • display-file (legacy docs)
    • display-signature (legacy docs)
    • info-table (legacy docs)
    • list (legacy docs)
    • menu (deprecated)
    • object-dropdown (legacy docs)
    • object-table (v1) (deprecated)
    • object-table (v2) (deprecated)
    • scan-barcode (legacy docs)
    • single-choice-dropdown (legacy docs)
  • JS/TS APIs
    • dialog (deprecated)
    • confirmDialog (deprecated)
    • generateCSV (deprecated)
    • saveFile (deprecated)
  • Other Features
    • Access Control Rules (deprecated)
    • Global View (app.xml) (deprecated)
    • Linking Views (deprecated)
    • Sync Rules v1 (deprecated)
  • Sync Rules v2 (legacy docs)
    • Migrating to Sync Rules v2
  • Manage App Users (deprecated)
Powered by GitBook
On this page
  • Configuration
  • Using the signature
  1. UI Components

capture-signature (legacy docs)

Previouscapture-file (legacy docs)Nextdisplay-file (legacy docs)

Last updated 2 years ago

These capture-signature docs are out of date

New functionality and features were added to capture-signature in version 4.74.0 of the JourneyApps Runtime. Please refer to the latest docs .

<capture-signature bind="form.signature" label="Please sign to accept" />

Configuration

Using the signature

Signatures are captured as SVG's with a path that describes it. That path can be accessed using toText():

// Get the SVG text of the signature as XML
// Assuming the name of the singature is `captured_sig`
var signatureSVG = view.captured_sig.toText();

Signatures can also be printed using a Zebra bluetooth printer (see docs) directly from version 4.34.4 of the JourneyApps container. The Zebra printer uses a language called ZPL, so we can convert the signature to ZPL by using:

// Get the SVG text of the signature as ZPL
// Assuming the name of the signature is `captured_sig`
var signatureSVG = view.captured_sig.toZPL();
Option
Required
Details

bind

required

Variable/field in which to store the signature. Must be a variable or field of type signature.

label

required

Text to display above the component. It can be a format string to make the text dynamic. If not specified, defaults to the value of the field specified in bind. To have no label, specify label="".

required

optional

true if this field must have a value before proceeding to another view. Defaults to false.

show-if

optional

Controls whether the component is hidden or shown. The argument specified to show-if can either be a literal boolean value (true or false), or it can specify a variable, parameter or field that can be a string, number, object, etc. that evaluates to false or evaluates to true. If the component also specifies required="true", but it is hidden, the validation will be ignored/skipped.

hide-if

optional

The opposite of show-if (see above).

here