This input field supports an integer or a floating point number. Further validation can be added using the Regular Expression, Minimum/Maximum, and Validation Function properties.
The value submitted for this field is a string representation of the number.
Properties
Label | Description | Type Name |
---|---|---|
Label | The label for this field | LABEL |
Show Label | Whether to show the label for this field or not. This property adds/removes a class on the field's label element. The styling itself is controlled by the site's stylesheet | SHOWLABEL |
Hint | Additional information displayed alongside the field to assist the user in completing it. The value of another field can be used by adding the field's name between # characters. See Common Field Properties for more information | HINT |
Required | Whether or not the field is required to have a value to pass validation | REQUIRED |
Default | A default value for the field, displayed when the field is first loaded | DEFAULT |
Prefix | An optional prefix to add to the field | PREFIX |
Suffix | An optional suffix to add to the field | SUFFIX |
Autocomplete | Adds a HTML autocomplete attribute to the field, which may prompt the browser to suggest relevant values for the filed, based on past or preconfigured (in the browser) values for the field. See Common Field Properties for more information | AUTOCOMPLETE |
Error Message | The error message that will be displayed if this field fails its validation | ERRMSG |
Error Message Function | A function that can be used to override the default error message. You can return a different message for each error type. The message can include the value of another field can be used by adding the field's name between # characters. See Error Message Functions for more information. This field has the following error types:
| ERRMSGFUNC |
Width | The display width of the field. The value matches a CSS class, which actually sets the width | WIDTH |
Searchable | Whether this field's value should be indexed by the search (the object collection if using the database save action and/or workflow process collection if starting a workflow process). This property is ignored if an External Type is specified for the form. In this case, the ability to search is determined by the searchable property of the type itself | SEARCHABLE |
Maximum length | The maximum number of characters that may be entered. Leave empty (or set to 0) if no restriction is required | MAXLENGTH |
Type | Set whether an Integer or Floating Point number should be allowed. If the entered number does not match the selected type, validation will fail | NUMBERTYPE |
Minimum | The minimum allowed value. Leave empty if no minimum value is to be enforced | MINVAL |
Maximum | The maximum allowed value. Leave empty if no maximum value is to be enforced | MAXVAL |
Regular Expression | A regular expression that will be used to validate the number. If the input number does not match this expression, the field validation will fail | REGEX |
Validation Function | A JavaScript function that can be used to provide custom field validation whenever the field value changes or the form is submitted. This function will be executed client-side, provided JavaScript is enabled in the browser, and repeated server-side | VALFUNC |
Default Function | A JavaScript function that can be used to calculate the default field value. This function is executed server-side when the field HTML is generated and is useful when the DEFAULT property is insufficient | DEFFUNC |
Handlers | A JavaScript function that is executed client-side whenever the page loads, or the field value changes. This function is useful for modifying the values of other fields based on an entered value | HANDLERS |
Read Only | Display the field as read only | READONLY |
Additional Styling Modifier | An optional CSS modifier for the field. See Common Field Properties for an example | ADDITIONALSTYLINGMODIFIER |
Documentation | Add documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an example | DOCUMENTATION |