InkControl
DEPRECATED use DrawingControl instead.
<div
id="mark_damage"
data-hf-control="InkControl"
data-hf-options="{
label: 'Mark damage with pen',
width: 226,
height: 270,
image: '{{HFFormPath}}/watermeter.png',
required: true,
clearButton: true,
defaultColor: '255, 33, 203, 0'
}"
></div>
FormControl Options
image - required
Write down the path to connect the field with your picture. The first part of the path represents a placeholder and will be changed at runtime.
How to use:
image: '{{HFFormPath}}/watermeter.png'Type:
stringclearButton
Defines a small button (x) on the bottom left of the picture with which the whole drawing can be deleted.
How to use:
clearButton: falseType:
booleanDefault:
truedefaultColor
The app default color is red (except for Signatures!). To customize it, use RGB values for the last three entries (33, 203, 0). The first value (255) always remains the same (Alpha value).
How to use:
defaultColor: '255, 33, 203, 0'Type:
stringdisabled
Set "true" whenever the InkControl should be disabled.
How to use:
disabled: trueType:
booleandoNotCopy
Set "true" whenever the field should get deleted if the Form is copied.
How to use:
doNotCopy: trueType:
booleaneraserButton
Defines a small toggleable button (Eraser Icon) on the bottom left of the picture with which the latest drawing can be erased
How to use:
eraserButton: falseType:
booleanDefault:
trueheight
Needs to be set for this control to define the height of the field. The value is defined in pixels.
How to use:
height: 280Type:
numberonChanged
Call a pre-defined JS-method to do something when the status of the control changes.
How to use:
onChanged: HFFormdefinition.Namespace.MethodType:
functionSignature:
function(value: boolean) => voidsaveTimeout
Duration in seconds until the inkcontrol is locked and saved. Default is 5 seconds.
How to use:
saveTimeout: 10Type:
integertooltip
Write a comment to provide further information about the field. A question mark will then be shown within the label and with a click/tap on it, the information will occur.
How to use:
tooltip: 'Please indicate at least one cause of damage.'Type:
stringtooltipTemplate
Write an ID of an HTML container to provide further information about the field. A question mark will then be shown within the label and with a click/tap on it, the content of the container will occur.
How to use:
tooltipTemplate: 'example_control_tooltip'Type:
stringwidth
Needs to be set for this control to define the width of the field. The value is in pixels. The maximum is always 460 px
How to use:
width: 226Type:
integerStored data
<div
id="mark_damage"
data-hf-control="InkControl"
data-hf-options="{
width: 226,
height: 270,
image: '{{HFFormPath}}/watermeter.png',
required: true,
clearButton: true }"
></div>
For each InkControl inside your Forms there are several value pairs of stored data:
The first two value pairs are the default data to be stored – the first pair indicates the InkControl has been used …
{
"id": "mark_damage",
"value": true
}
… and the second pair stores the information on the created image
{
"id": "mark_damage_HFInkImage",
"value": "mark_damage.png"
}
Finally, the third pair stores the information on the image merged with a provided background image
{
"id": "mark_damage_HFInkImageMerged",
"value": "mark_damage_merged.png"
}