writeonly

Sets a field to be write only. This means that the user can type into the field, but cannot read what is typed. Instead, each character is replaced by a uniform symbol (such as an asterisk).

This is useful if you are creating a password field.

Syntax

   <writeonly>setting</writeonly>
Table 1. writeonly parameter
Parameter Type Description
setting on the item is write only, which means that each character is replaced with a uniform symbol (such as an asterisk) to obscure the input.
  off the item displays input normally.

Available in

field

Example

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

   <field sid="writeOnlyField">
      <value>You cannot type into this field.</value>
      <writeonly>on</writeonly>
   </field>
     

Usage details

  1. Default:
    • XFDL: off
    • XForms: the xforms:secret option, if present.
  2. The xforms:secret option overrides the writeonly option, and forces the field to be write only.