NumberFormatting

Overview

The NumberFormatting control supports number formatting functionality for numeric field inputs. Using Number Formatting, number values have the capability to be displayed as notations, percents, or currencies, in numeric formats specific to any locale, and subject to a number of other custom numeric specifications. In addition to granting form creators an array of formatting options to match their needs, this capability increases form readability as users are able to better understand field numeric types without the addition of text-based explanations. Easy and intuitive interpretation of input is provided to users, while database representation remains in the desired un-formatted type.

Post-Populated Field

Excel Sheet Input

Required fields

The NumberFormatting control type requires the following Excel columns:

  • Name: The name of the field saved to the database. See here for details and restrictions.

  • Type: The name of the C# type backing this field. Can be any of the following types:

    • System.Double
    • System.Single
    • System.Decimal
  • ControlType: The name of the desired control type. Must be set to NumberFormatting.

  • FormattingLocale: The "locale" describing what cultural norms to use when formatting the number. If not provided or blank, defaults to United States English (en-us). See here for details.

  • FormattingOptions: Various options describing what formatting to apply to the number. See here for details.

Optional fields

The NumberFormatting control type also supports the following Excel columns:

FormattingOptions

Min

This defines the minimum possible numeric input into the NumberFormatting field and can be declared in the Min column. All input values below will display an error box to the user.

Max

This defines the maximum possible numeric input into the NumberFormatting field and can be declared in the Max column. All input values below will display an error box to the user.

DefaultValue

This defines the default balue that is displayed to the user and stored in number representation on the database upon initialization. It can be declared under the DefaultValue column.

User Experience

The user experience for Number Formatting consists of three stages. 1) Pre-populated fields, 2) fields during numeric inputting, 3) post-populated field.

Pre-Populated Fields

Prior to populating the Number Formatting field, the input display is set to a default display formatted value of the locale and options applied to a value of 0, as seen in the figure below. Please note that there has been no value representation set on the database at this stage.

Pre-Populated Field

Field During Numeric Inputting

While the user is inputting a value into the Number Formatting field, the field will display the un-formatted number as it will be stored on the database. This display format will remain until the user clicks away and the field enters the post-population stage.

Field During Numeric Inputting

Post-Population Fields

Once the numerical input has been made, and the user has clicked away from the field, the Number Formatting field will display the formatted value of the input value. This value will only be displayed on the front-end, while the inputted value will be the value represented on the server.

Post-Populated Field