Numeric Input State Variable Reference

Table of contents


Introduction

Numeric Input state variables represent user number inputs. Each rendered component will display according to the format and limits specified in the state variable.

MVCS supports three types of numeric input mechanisms: a physical or virtual keyboard, a popup keypad, or a thumbwheel. The app Settings page can select the desired input mechanism for each device type by setting the set_inputType state variable. See Standard Settings Page.

If the state variable's ID contains a subName (e.g., 'myPage_mySv_kg'), it will be considered a unit specifier. If a rendered numeric input component has the showUnits attribute, the unit abbreviation for the unit subName will be displayed after the number.

Constructor

Syntax

ctl.createPage({
	...,
	stateVarInfo:[
		{type:'numericInput', ...},
	],
})

Parameters

Note: If the info.id


Instance methods

Inherited methods

Note: The component() method returns a NumInputSvCmp.


Instance properties

Inherited properties


fmt

A NumFmt instance specifies the desired numeric format and limits.

Value

A NumFmt instance.


max

The maximum valid value. Sets/gets fmt.max.

Value

A Number.


min

The minimum valid value. Sets/gets fmt.min.

Value

A Number.


isNumber

Always true for numericInput.

Value

A Boolean.


isUnit

True if the state variable has a unit subName.

Value

A Boolean.


unit

The first subName. For example, 'kg' if the state variable ID is 'myPage_mySv_kg'.

Value

A String.


Component attributes

Inherited attributes


inputType

The inputType attribute establishes a particular user input type that overrides the set_inputType state variable if it exists. The values can be:

Value

A String.


plusMinus

If plusMinus is true, then "-" and "+" buttons will apear to the left and right of the input. Pressing one of the buttons will increment or decrement the value by fmt.rndMult.

Value

A Boolean.

DOM element properties