Skip to main content
Version: 9.1

NumericField

NumericFields restrict the input value to numbers in the case of a simple input field or you refine it by further properties to offer a kind of slider.

<div id="temperatur" 
data-win-control="HFWinJSCtrl.NumericField"
data-win-options="{
step: 0.1,
min: 20,
max: 45,
placeholder: '°C',
decimals: 1,
format: '0.0°',
startValue: 36
}"></div>
PropertyTypeHow to useDescription
cultureStringculture: 'de-CH'Set the number format according to the lingual characteristics.
decimalsNumberdecimals: 1Define the number of decimals you want to display.
disabledBooleandisabled: trueSet "true" whenever the NumericField should be disabled. The default value is false.
disableOpenDialogBooleandisableOpenDialog: trueSet "true" whenever the NumericField should be prevented opening in a dialog and hide spinner buttons on mobile devices. The default value is false.
doNotCopyBooleandoNotCopy: trueSet "true" whenever the field should get deleted if form is copied.
formatStringformat: '0.0°'Define the format of the value shown in the final form. https://docs.telerik.com/kendo-ui/globalization/intl/numberformatting
labelStringlabel: 'Date'Define a label for your control element.
listBooleanlist: trueSet "true" whenever the content should show up in the list on the dashboard.
listOptionsObjectlistOptions: {...}Set additional options for controls with list equals true. E.g. set custom label for filter/sort/group dialogs or hide them complettely.
mappingBooleanmapping: trueSet "true" whenever the form element should be visible / editable in the corresponding SharePoint list.
maxNumbermax: 45Set the maximum input value.
minNumbermin: 20Set the minimum input value.
persistentStringpersistent: 'user'The value "user" sets the initial value of the NumericField to the value of the previous form item of the current user and overwrites any defaultValue.
placeholderStringplaceholder: '°C'Define a placeholder text for the NumericField.
requiredBooleanrequired: trueSet "true" if the control has to be filled in.
startValueNumberstartValue: 36Set the start value of the NumericField.
stepNumberstep: 0.1Define the value of increase / decrease step when using the up and down arrows.
tooltipStringtooltip: '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.
visitingBooleanvisiting: trueSet "true" whenever the form element should be marked as "visited" when the user has clicked or tapped at the form field.
inputModeStringinputMode: 'numeric'Set the virtual keyboard on a mobile device to a certain type of data. But be careful with this setting. If region settings on the phone differs to culture settings in the form, this could lead to unwanted behaviour. For all available options see this here
onChangedFunction(value: number)onChanged: HFFormdefinition.Namespace.MethodCall a pre-defined JS-method to do something when the status of the control changes
Note

For defining the format to be displayed as percentage value you have to escape the special character by using the number sign and two back slashes (i.e. format: '# \%').

listOptions Object

PropertyTypeHow to useDescription
dialogTextStringdialogText: 'Display Text'Set custom label for filter/sort/group dialogs.
dialogHideBooleandialogHide: trueHide field from filter/sort/group dialogs.

Stored data

<div id="temperatur" data-win-control="HFWinJSCtrl.NumericField" data-win-options="{
step: 0.1,
min: 20,
max: 45,
placeholder: '°C',
decimals: 1,
format: '0.0°',
startValue: 36 }" >
</div>

For each NumericField inside your forms there are two value pairs of stored data:

{
"id": "temperatur",
"value": 36.2
}
{
"id": "temperatur_HFNumericField",
"value": "36°C"
}