ButtonControl
The ButtonControl invokes a predefined custom callback.
<div
id="buttonControlSample"
data-win-control="HFWinJSCtrl.ButtonControl"
data-win-options="{
buttonType: 'large',
buttonLabel: 'Test',
buttonHeading: 'Button',
callback: HFFormdefinition.SampleHelpers.buttonControlCallback
}"
></div>
FormControl Options​
buttonType - required​
Define the size of the button.
How to use:
buttonType: 'medium'Type:
'small' | 'medium' | 'large'callback - required​
Call a pre-defined JS-method to do something when the button is invoked.
How to use:
callback: HFFormdefinition.Namespace.MethodType:
functionSignature:
function() => Promise<void>audioFeedback​
Enable/Disable audio feedback on click.
How to use:
audioFeedback: trueType:
booleanDefault:
truebuttonHeading​
Define a label for the control element.
How to use:
buttonHeading: 'Test'Type:
stringbuttonLabel​
Define the button caption.
Only visible by choosing buttonType 'medium' or 'large'.
Only visible by choosing buttonType 'medium' or 'large'.
How to use:
buttonType: 'medium'Type:
stringcallbackFeedback​
Enable/Disable callback feedback on callback funtion return.
How to use:
callbackFeedback: trueType:
booleanDefault:
truedisableOnClick​
Disable button while callback function is executed.
How to use:
disableOnClick: falseType:
booleanicon​
Sets the icon of the button. Can be FontAwesome Icon or SVG Image.
How to use:
icon: 'fa-barcode-scan'Type:
stringvibrationFeedback​
Enable/Disable vibration feedback on click.
How to use:
vibrationFeedback: trueType:
BooleanDefault:
true