BooleanControl
The BooleanControl is a hidden helper control that can be used to store boolean values in the form.
Example
<div
    id="boolean_control_id"
    data-hf-control="BooleanControl"
    data-hf-options="{
        defaultValue: false,
        onChanged: HFFormdefinition.Namespace.Method
    }"
></div>
FormControl Options​
defaultValue​
Provide a default boolean value for the control. A Custom Code function can be used to set defaultValue.
How to use: 
defaultValue: falseType: 
boolean | functionSignature: 
function() => booleandoNotCopy​
Set "true" whenever the field should be cleared if the Form is copied.
How to use: 
doNotCopy: trueType: 
booleanonChanged​
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: object) => voidpersistent​
It is the value where the "user" sets the initial value of the DataControl to the value of the previous Form item of the current user and overwrites any defaultValue.
How to use: 
persistent: 'user'Type: 
'user'copyValueFrom​
Define a FormControl that synchronizes its value with the current field. This synchronization process occurs upon navigating to the page where the current control is situated. It only occurs if the field is empty or the mode is set to "overwrite".
<div
    id="boolean_control_id"
    data-hf-control="BooleanControl"
    data-hf-options="{
        copyValueFrom: 'data_control_test_copy'
}"
></div>
Option interface
interface ICopyValueFromObject {
    sourceId: string;
    mode: 'overwrite' | null;
    callback: (value: string) => string;
}
type CopyValueFromType = string | ICopyValueFromObject;
callback​
Specify a function to process value before copy.
How to use: 
callback: HFFormDefinition.Namespace.processValueType: 
functionSignature: 
function(value: string) => stringmode​
Specify if target field gets overwritten. Default behaviour is to only copy to empty fields.
How to use: 
mode: 'overwrite'Type: 
stringStored data​
The simplest storage – ID and the filled-in stringified value:
{
    "id": "data_control_id",
    "value": false
}