menulist.formwidget

The <menulist class="formwidget" holds the name and label of the widget, the selectedItem holds the value. If the selectedItem has no value, it's label is used. You should use plain menuitems. If you have checkboxes, radiobuttons or nested menus in your menu, you dont want this kind of formwidget, use typed menuitems. As a result, the menulist formwidget is a single select flat menulist.

When seeded, the menulist matches any seed with the same name. It searches for a menuitem with the same value as the matching seed and selects that. If none is found, it sets the menulists value and label to the seeds values.

Note: in XUL, menulists have label and value properties. Once you select an item, the menulist's properties are set; with an editable menulist, this turns the menuitem's label into the menulist's value. reversely, with non-editable menulists the menulist's label can be changed by javascript without changing the selected item's label. Setting the menulist's value property tries to select a menuitem. Confusing as it is, formwidgets try to follow that behaviour.

The menubar is not implemented.

Example:

<menulist name="ml" class="formwidget"> <menupopup> <menuitem label="the first item" value="item1"/> <menuitem label="the second item" /> </menupopup> </menulist> result:
seed:ml/item1/the first item
cgi:ml=item1

Additional Attributes:


Additional Methods: