Usage details

  1. Default datatype: string.
  2. Default presentation:
    • calendar — gregorian (en_US locale)
    • casetype — none
    • currencylocale — the locale of the form
    • decimalseparator — period (.) (en_US locale)
    • fractiondigits — maximum number of digits allowed by data type
    • negativeindicator — minus sign (-) (en_US locale)
    • pad — 0
    • padcharacter — 0 (en_US locale)
    • pattern — n/a
    • round — up
    • groupingseparator — comma (,) (en_US locale). To remove the grouping separator, use none.
    • showcurrency — on
    • significantdigits — the maximum number of digits allowed for the data type
    • style — medium
    Note: The default values for other locales are listed in the locale in the Locale Specification for XFDL.
  3. Default constraints:
    • casesensitive — off
    • checks — none
    • decimalseparator — period (.) (en_US locale)
    • length — maximum range of lengths allowed for the data type
    • mandatory — the required property of the linked XForms data element, or off
    • message — the <xforms:alert> setting for the item, if present.
    • patterns — n/a
    • range — the maximum range allowed by the data type
    • groupingseparators — comma (,)
    • template — n/a
    • yearwindow — a sliding date with a factor of 30
  4. In some cases, it's possible to create formatting that will have unpredictable results. For example, if you specify that the grouping separator should be a period, this may cause problems since the decimal separator is also a period. Use good judgement when defining your formats.
  5. All constraints are applied to the input data. This may create an item the user cannot complete. For example, the combination of data type date and constraint pattern of #.# creates such a situation. A date type cannot be formatted as a decimal number.
  6. You should use caution if you are designing forms that use two digit dates. While the yearwindow setting provides a mechanism for interpreting two digit dates, the best solution is to use four digit dates.
  7. When applying a format to a combobox, list, or popup, the formatting will be applied to the value of each cell linked to the item. Those cells that do not pass the check will be flagged or filtered. If a cell passes the checks, its value will be replaced with a formatted value before the item is displayed. The label option for these cells will remain unaffected.
  8. When applying a format to a combobox, list, or popup item, a cell with an empty value will fail all format checks but will still be selectable, even if input is mandatory. This allows users to erase their previous choice (which will also reset all formulas based on that choice). However, users will still need to select a valid cell before they can submit the form.
  9. If any two comboboxes, lists, or popups use the same set of cells, they must apply the same formatting.
  10. The void data type disables a format line completely through the use of a compute. Void formats never fail regardless of the checks in the format statement.
  11. For details on using the format option in buttons, see the Usage details in the button item description.
  12. The message constraint overrides the <xforms:alert> setting for the item. .
  13. An item is mandatory if either the mandatory constraint is set to true or the required property for a bound data element is set to true.
  14. If an element in the XForms data model is both empty and invalid, then any item on the form that is bound to that element is set to be mandatory.