Menu

Tag Type C++ code (built in to libHForm/scan_body.cc)
Attributes var=varName Required. (Except when "set" is used. See below.) Sets the variable name whose value we want to set with this menu. Without any other options, the possible choices for a value are assumed to be found in (private or public) variables named varName[value1]="text to display for value1", varName[value2]="text to display for value2", etc.
multipleWhen present, allows the user to select multiple choices from the menu, and returns them in a list, delimited by whatever delimiter was specified for the variable in the Var tag that declared it. The Var declaration (in the Head section of your document) must contain the delim attribute, as there is no default!
onChange=actionId Optional. If present, causes the form to be submitted immediately if the menu is changed. The form goes back to the server and the associated Action is executed.
choices=listName Optional. Changes the possible value list for var to be off the pattern listName[value1]="text to display for value1", listName[value2]="text to display for value2", etc.
prefix=string and
postfix=string
The default values for these are prefix="%choices;[" and postfix="]". %choices; will be replaced by var (or choices, if choices is given). If you change these, they will remain set for all subsequent menu tags.
setWhen present, allows you to set up prefix and postfix without actually creating a menu.
Contained Tags None.
Related Tags This tag must appear in the Body section.
Comments In addition to the example shown below, there is an demo showing how to use the Menu tag along with an Icon. The icon can be used for feedback to the user. For example, they switch a menu to a new setting, then when the picture changes, they know it actually took effect.

Square brackets [] are not allowed in par file variable names, so when menu options are listed in par files, underscores _ are used instead, and "desc" is added to the postfix. In order to specify this in the RPM form, the following syntax should be used. (You can use this to specify many kinds of patters, including ones with %choices; in the postfix.
  . . .

  {Body}
  {Menu set prefix="%choices;_" postfix="_desc"}

  . . .

  {Menu var=lamps}
  {Menu var=filters}

  . . .

  {/Body}