Skip to content

Numeric Box

NumericBox edits a number at its XPath. It uses the active client locale for decimal and thousands separators, then writes a normalized numeric string to the data model.

XML Fields

Value and Formatting

  • XPath identifies the numeric form-data field.
  • Decimals selects the number of displayed and saved decimal places. ShowDigits controls whether thousands separators are displayed according to the form culture.

Layout and Validation

  • Size controls width and PlaceHolder supplies in-field help.
  • RequiredForGroup applies grouped validation. Hints provides help text and Rules is the place to define business limits, required conditions, or other numeric validation.

Formatting

Decimals controls the number of decimal places and defaults to 2. ShowDigits controls whether thousands separators are displayed and defaults to true. Define business minimum and maximum values with form validation rules rather than relying on input formatting.

For RequiredForGroup validation, both an empty value and 0 are treated as missing. Use a separate validation rule when zero is valid but the field must still be required. When read-only, the value is shown as formatted display text instead of an input.

Example

1
2
3
4
5
<NumericBox XPath="Totals/DiscountRate" Decimals="4" ShowDigits="False" Size="Small" RequiredForGroup="">
    <PlaceHolder><![CDATA[]]></PlaceHolder>
    <Hints><![CDATA[]]></Hints>
    <Rules />
</NumericBox>