Skip to main content
Version: 9.5

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.Method
Type: function
Signature: function() => Promise<void>

audioFeedback

Enable/Disable audio feedback on click.

How to use: audioFeedback: true
Type: boolean
Default: true

buttonHeading

Define a label for the control element.

How to use: buttonHeading: 'Test'
Type: string

buttonLabel

Define the button caption.
Only visible by choosing buttonType 'medium' or 'large'.

How to use: buttonType: 'medium'
Type: string

callbackFeedback

Enable/Disable callback feedback on callback funtion return.

How to use: callbackFeedback: true
Type: boolean
Default: true

disableOnClick

Disable button while callback function is executed.

How to use: disableOnClick: false
Type: boolean

hidden

Hide FormControl in Form.

How to use: hidden: true
Type: boolean

icon

Sets the icon of the button. Can be FontAwesome Icon or SVG Image.

How to use: icon: 'fa-barcode-scan'
Type: string

vibrationFeedback

Enable/Disable vibration feedback on click.

How to use: vibrationFeedback: true
Type: Boolean
Default: true