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>
Property | Type | How to use | Description |
---|---|---|---|
defaultValue | String | defaultValue: '1' | Set the initial status of the SelectBox to a "selected" option. A custom code function can be used to set defaultValue. |
deletable | Boolean | deletable: true | Set "true" whenever the values of the SelectBox should be deletable. The default value is false. |
disabled | Boolean | disabled: true | Set "true" whenever the SelectBox should be disabled. The default value is false. |
doNotCopy | Boolean | doNotCopy: true | Set "true" whenever the field should get deleted if form is copied. |
label | String | label: 'Floor' | Define a label for your control element. |
list | Boolean | list: true | Set "true" whenever the content should show up in the list on the dashboard. |
listOptions | Object | listOptions: {...} | Set additional options for controls with list equals true . E.g. set custom label for filter/sort/group dialogs or hide them complettely. |
mapping | Boolean | mapping: true | Set "true" whenever the form element should be visible / editable in the corresponding SharePoint list. |
persistent | String | persistent: 'user' | 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. |
required | Boolean | required: true | Set "true" if the control has to be filled in. |
tooltip | String | tooltip: 'Please indicate at least one cause of damage.' | 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. |
visiting | Boolean | visiting: true | Set "true" whenever the form element should be marked as "visited" when the user has clicked or tapped at the form field. |
onChanged | Function(value: string) | onChanged: HFFormdefinition.Namespace.Method | Call a pre-defined JS-method to do something when the status of the control changes (optional) |
listOptions Object
Property | Type | How to use | Description |
---|---|---|---|
dialogText | String | dialogText: 'Display Text' | Set custom label for filter/sort/group dialogs. |
dialogHide | Boolean | dialogHide: true | Hide field from filter/sort/group dialogs. |
Stored data
For each SelectBox there are two value pairs stored:
{
"id": "floor",
"value": "1"
}
{
"id": "floor_HFSelectText",
"value": "1st floor"
}