label (option)

Specifies a text label for an item.

The label usually appears before the item and aligned with its left margin. For popup items, the label appears inside the item when no selection has been made.

Syntax

   <label>label text</label>
Table 1. label parameters
Parameter Type Description
label text string The text of the label.

Available in

cell, check, checkgroup, combobox, field, list, pane, popup, radio, radiogroup, slider, spacer, page global, form global

Example

This sample defines a typical label.

   <label>Student Registration Form</label>

Usage details

  1. Default:
    • XFDL: none
    • XForms: the value of the xforms:label option.
  2. If an item contains both a label option and an xforms:label option, the XFDL label option takes precedence.
  3. The label defined in a label option has a transparent background by default. To display a particular color behind the label, set the labelbgcolor option.
  4. If used in the page global, the label option sets the title of the page as it appears in the title bar of the window displaying the form. If used in the form global, the label option sets the default title for all pages.
  5. Multiple line labels require a carriage return in the code where you want it to appear in the label. For example:
       <label>This label spans
       two lines.</label>
    

    Note that not all items allows multi-line labels.

  6. If a bidirectional language is used, the label text direction is consistent with the item orientation.
    • In a Left-To-Right (ltr) orientation, the label text direction is Right-To-Right.
    • In a Right-To-Left (rtl) orientation, the label text direction is Left-To-Left.
  7. If a bidirectional language is used, the label justification is also consistent with the item orientation.
    • If your checkgroup or radiogroup has a Left-To-Right (lrt) orientation, then the label appears to the right of each check or radio item.
    • If your checkgroup or radiogroup has an Right-To-Left (rtl) orientation, then the label appears to the left of each check or radio item.