SelectBox
This type of form control is similar to the HTML select box and the ComboBox control.
<select id="floor"
data-win-control="HFWinJSCtrl.SelectBox"
data-win-options="{
label: 'Floor',
defaultValue: '1',
required: true
}">
<option> </option>
<option value="1">1st floor</option>
<option value="2">2nd floor</option>
</select>
FormControl Options
defaultValue
Set the initial status of the SelectBox to a "selected" option. A custom code function can be used to set defaultValue.
How to use:
defaultValue: '1'Type:
string | functionSignature:
function() => stringdeletable
Set "true" whenever the values of the SelectBox should be deletable.
How to use:
deletable: trueType:
booleandisabled
Set "true" whenever the SelectBox should be disabled.
How to use:
disabled: trueType:
booleandoNotCopy
Set "true" whenever the field should get deleted if form is copied.
How to use:
doNotCopy: trueType:
booleanlist
Set this property to "true" if data connected with this control should be a sorting/filtering/grouping option on the listpage, is used in template objects (eg. the listTemplate) or it should show up in admin ui listings.
How to use:
list: trueType:
booleanlistOptions
Set additional options for controls with list equals true. E.g. set custom label for filter/sort/group dialogs or hide them complettely.
How to use:
Type:
{ dialogText: string, dialogHide: boolean }onChanged
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: string) => voidpersistent
The value "user" sets the initial selected value of the select box to the value of the previous form item of the current user and overwrites any defaultValue.
How to use:
persistent: 'user'Type:
'user'tooltip
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 a 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:
stringvisiting
Set "true" whenever the form element should be marked as "visited" when the user has clicked or tapped at the form field.
How to use:
visiting: trueType:
booleanlistOptions Object
dialogText
Set custom label for filter/sort/group dialogs.
How to use:
dialogText: 'Display Text'Type:
stringStored data
For each SelectBox there are two value pairs stored:
{
"id": "floor",
"value": "1"
}
{
"id": "floor_HFSelectText",
"value": "1st floor"
}