Label
<div id="follow_up"
data-win-control="HFWinJSCtrl.Label"
data-win-options="{
label: 'Follow up'
}"></div>
FormControl Options
htmlFor
Set the "for" attribute of the label element to a specific id.
htmlFor: 'control_id'
string
requiredFields
Write down the ID's of those fields (i.e. a group of checkboxes or radioboxes) that belong to this label. Can be comma-separated list or complex array.
requiredFields: 'repair_cover_glass_broken, repair_roll_counter_broken,...'
string | IComplexRequiredFields[]
requiredFieldsOp
Define first level comparison operator of the requiredFields. Valid values are "and" or "or".
requiredFieldsOp: 'and'
'and' | 'or'
or
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.
tooltip: 'Please indicate at least one cause of damage.'
string
tooltipTemplate
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.
tooltipTemplate: 'example_control_tooltip'
string
requiredFields
Simple
Example for comma-separated requiredFields in which all fields must be filled.
<div id="checkboxh_label"
data-win-control="HFWinJSCtrl.Label"
data-win-options="{
label: 'Checkbox (horizontal)',
required: true,
requiredFields: 'checkboxh1,checkboxh2,checkboxh3,checkboxh4,checkboxh5,checkboxh6,checkboxh7,checkboxh8',
requiredFieldsOp: 'and',
tooltip: 'Multiple choice'
}"></div>
Complex
Example for complex array validation.
<div id="checkboxv_label"
data-win-control="HFWinJSCtrl.Label"
data-win-options="{
label: 'Checkbox (vertikal)',
required: true,
requiredFields: [
{
op: 'and',
fields: 'checkboxv1,checkboxv2'
},
{
op: 'or',
fields: 'checkboxv3,checkboxv4,checkboxv5'
}
],
requiredFieldsOp: 'and',
tooltip: 'Multiple choice'
}"></div>
interface IComplexRequiredFields {
op: 'and' | 'or';
fields: string;
}
fields
Write down the ID's of those fields (i.e. a group of checkboxes or radioboxes) belonging to this object as comma-separated list.
fields: 'checkboxv1,checkboxv2'
string
op
Define second level comparison operator of the requiredFields. Valid values are "and" or "or".
op: 'and'
'and' | 'or'
or
requiredFieldsOp
concenates every object inside the array.