Number field (Simplified)

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

Syntax
<field
    name="NCName"
    id="NCName"?
    type="number"
  >
  <format>...</format>?
  <constraints>...</constraints>?
  ANY-FOREIGN-ELEMENT*
  <parameter/>*
</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.

id="NCName" (optional)

The id of the field element. Set this attribute if you want to be able to reference this element using XInclude. Otherwise it is not required.

type="number"

Specifies that this field is a number field.