MenuArray Element (Data)
The "menu_array" element allows you to create a menu whose options are dynamically determined via scripts. These scripts setup the contents of the array that dictates the available options. The complete list of attributes for this element is below.
field Id – Specifies the unique id of the field whose contents reflect the current selection from the menu. The field must be a text-based field and must exist within the pick/thing associated with the containing template. If this portal is not defined within a template, a menu is not allowed. array Boolean – Specifies the unique id of the array-based field to be used to drive the available options. The field must be text-based, must be an array, and must exist within the pick/thing associated with the containing template. maxvisible (Optional) Integer – Specifies the maximum number of items that will be visible at one time within the menu when the user opens it for selection. If there are more items to choose from, a scroller will allow the user to access them. Default: "5". showlabel (Optional) Boolean – (iPad only) Indicates whether the label displaying the current selection of the menu should be shown. This is used when you just want the menu control to be used as a button to make a selection which will be displayed some other way. Default: "yes".
The following example demonstrates what an array-based menu portal might look like. All default values are assumed for optional attributes.
<portal id="menutext" style="Menu" width="150"> <menu_array field="pwmTextSel" array="pwmList" maxvisible="9"/> </portal>