The Number form element allows the user to select a number.
To use a number element, the user types a number into the box. Alternatively, the user can click the arrows to increase or decrease the number. The box shows the currently selected number.
Example of the Number form element, shown in a Geocortex viewer
See also...
The following table describes the properties of the
If a property can be configured in the Properties panel and accessed in expressions, the property has two names: the name that appears in the Properties panel and the name that is used in expressions. Both names are given in the table. Sometimes the names only differ in capitalization, for example, Visible (in the Properties panel) or visible
(in expressions).
Properties of the Number Form Element
Description |
Type: String A description of the element. The description appears below the element's title. You can use the Description property to describe what the element represents or to provide instructions to the user about how to use the element. You can format the description using Markdown. |
Default Value |
Type: Number The number that initially appears in the If you leave Default Value blank and the user does not enter a value, the number will be null. To prevent a null number, make the number required. |
Element ID |
Type: String The element's ID, which is used in other form elements and activities to access the element's properties You cannot get or set the value of the Element ID property in an expression—you can only use the value that you configured for it. To use the Element ID property in an expression: ${Display Form ID}.state.{Element ID}.{property name} For example: $form1.state.number1.visible |
Enabled |
Type: Boolean Name in Properties Panel: Enabled Name to Use in Expressions: enabled Indicates whether the By default, To access the ${Display Form ID}.state.{Element ID}.enabled For example: $form1.state. |
error |
Type: String | MarkdownRef Indicates whether an error occurred in the element. MarkdownRef objects have a We recommend using the Set Form Element Error and Clear Form Element Error activities to work with errors in form elements. |
Lower Bound |
Type: Number The minimum value that the user can enter. If you leave Lower Bound blank, the minimum value will be JavaScript's minimum value. |
Precision |
Type: Number They number of decimal digits to show, for example:
The value must be within the lower and upper bounds. If the user types in a number that is below the lower bound, the number is rounded up to the lower bound. If the user types in a number that is above the upper bound, the number is rounded down to the upper bound. |
Type: Boolean Name in Properties Panel: Required Name to Use in Expressions: require Indicates whether the user must enter a number in the Number box. When the number is required, the user cannot submit the form until a number has been entered. By default, The Required checkbox is intended as a quick way to do simple validation without having to add a To access the ${Display Form ID}.state.{Element ID}.require For example: $form1.state. |
Type: Number The amount by which the number in the If the precision is negative, the step size should be at least as big as the amount by which the precision rounds the number. For example, if the precision is -2, the number will be rounded to the nearest hundred. If you set the step size to anything less than 100, the number will increase and decrease by 100. |
Title |
Type: String The element's title, which appears at the top of the element. You may want to change the title to describe what the element represents in your workflow. Descriptive titles make forms easier to understand. You can format the title using Markdown. |
Tooltip |
Type: String A message that displays when the user hovers the mouse pointer over the |
type |
Type: String The variety of form element. Use the To access the ${Display Form ID}.state.{Element ID}.type For example: $form1.state.number1.type |
Upper Bound |
Type: Number
|
value |
Type: NumberRef The currently NumberRef objects have a To access the ${Display Form ID}.state.{Element ID}.value For example: $form1.state. |
Visible |
Type: Boolean Name in Properties Panel: Visible Name to Use in Expressions: visible Indicates whether the element is visible to the user. By default, To access the ${Display Form ID}.state.{Element ID}.visible For example: $form1.state.number1.visible |
The following table describes the events associated with the
Events for the Number Form Element
load |
The You can use the |
change |
The You can use the The |
validate |
The You can use the If you use a Set Form Element Error activity, make sure you also use a Clear Form Element Error activity to clear the error. Otherwise the form may get stuck in an invalid state. By default, the Required property does not work when the For an example, see Example - Subworkflow for a Validate Event. |