capture-signature
Overview
Version compatibility
The capture-signature
component was visually updated in version 4.74.0 of the JourneyApps Runtime.
Allows users to capture a signature digitally.
Using signatures
Signatures are captured as SVG's with a path that describes it. That path can be accessed using 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:
Basic Example
Standard Attributes
bind
bind
label
label
required
required
Advanced Attributes
align-content
align-content
align-controls
align-controls
align-label
align-label
control-order
control-order
dialog-title
dialog-title
Version compatibility
dialog-title
was introduced in version 4.88.0 of the JourneyApps Runtime.
Optional
Type: string
(static text, a format string or the return value of a JS/TS function)
Default: "Sign here"
Override the title that is displayed at the top of the dialog when capturing a signature.
disabled
disabled
fullwidth
fullwidth
Optional
Type: boolean
Default: false
Specify whether the signature preview should span the full width of the available screen space.
icon-position
icon-position
Version compatibility
icon-position
was introduced in version 4.86.1 of the JourneyApps Runtime.
id
id
label-case
label-case
Version compatibility
label-case
was introduced in version 4.80.0 of the JourneyApps Runtime.
label-color
label-color
on-change
on-change
orientation
orientation
Version compatibility
orientation
was introduced in version 4.88.0 of the JourneyApps Runtime and is supported on mobile platforms: Android and iOS.Container version 23.5.1 or later is required for this feature on iOS, and is recommended for Android.
Optional
Type: auto
| landscape
| portrait
Default: auto
Lock the orientation of the draw-pad for capturing a signature.
When orientation
is set to landscape
or portrait
, the draw-pad will always display in the specified orientation, regardless of the orientation of the device. When orientation
is set to auto
, or not specified, the orientation of the draw-pad mirrors the orientation of the device.
show-if
and hide-if
show-if
and hide-if
Component Methods
The following component methods are available when an id
is assigned to the component and component.captureSignature({id:'my-id'})
/ component.displaySignature({id:'my-id'})
is called from JS/TS:
captureMedia
captureMedia
Programmatically open the signature dialog that allows the user to sign.
closeMedia
closeMedia
Programmatically close the signature preview.
deleteMedia
deleteMedia
Programmatically clear a captured signature.
deleteMedia
will trigger an on-change
if a function is assigned to it.
openMedia
openMedia
Programmatically open the signature preview.
scrollIntoView
scrollIntoView
Programmatically scroll until the capture-signature
/ display-signature
component is visible in the view.
Last updated