Number field

Defines a number field, which may contain any numeric value (including decimals).

Syntax
<field
    name="NCName"
    type="number"
  >
    <array/>?
    <format>...</format>?
    <constraints>...</constraints>?
    ANY-FOREIGN-ELEMENT*
    <parameter/>*
    <options>...</options>?
  </field>

Only one form of the constraints element may be used: Number constraints.

Examples
  • This example defines a constrained numeric field in which only numbers between 1 and 6 are allowed.

    <field type="number" name="score">
      <ui:label>Score</ui:label>
      <ui:description>Enter your rating</ui:description>
      <constraints>
        <minimum>1</minimum>
        <maximum>6</maximum>
      </constraints>
    </field>
Attributes
name="NCName"

The name of the field element. Note that no two fields belonging to the same panel may have the same name.

type="number"

Specifies that this field is a number field.