readonly

Sets the item to be readonly, so that user's can read information in the item but cannot change that information.

Syntax

   <readonly>setting</readonly>
Table 1. readonly parameter
Parameter Type Description
setting on the item is readonly.
  off the item accepts input.

Available in

check, checkgroup, combobox, field, list, popup, radio, radiogroup, slider

Example

The following example shows a field that is set to be readonly:

   <field sid="readOnlyField">
      <value>You cannot type into this field.</value>
      <readonly>on</readonly>
   </field>

Usage details

  1. Default:
    • XFDL: off.
    • XForms: defaults to the readonly property for the data element to which the containing item is bound.
  2. If an item has either the readonly option or the XForms readonly property set, then the item is readonly. For more information about the readonly property, refer toAvailable Properties.
  3. The readonly setting permits users to scroll an item even though they cannot update the item's contents.