MenuThings Element (Data)
The "checkbox" element is useful whenever the user has a choice between two clearly opposite states, such as on/off, enable/disable, show/hide, etc. In addition to the traditional visual presentation of text with a box next to it, the Kit allows you to use checkboxes to present to alternate visual states. For example, within the World of Darkness data files, the abilities to promote items to the top of a list and toggle inclusion within printouts are checkboxes that merely toggle between two states and change the visuals accordingly. The complete list of attributes for this element is below.
field Id – Specifies the unique id of the field whose contents dictate whether the checkbox is in the on or off state. The field must be a value-based field, with a non-zero value indicating "on" and a zero value indicating "off". The field must exist within the pick/thing associated with the containing template. If this portal is not defined within a template, a checkbox is not allowed. message (Optional) Text – Specifies the message text to display next to the actual box. If empty, no text is displayed. Default: Empty. dyanamicfield (Optional) Id – Specifies the unique id of a different field from which the message text will be pulled. This allows the message text to be dynamically determined via scripts. If empty, no dynamic field is specified. Default: Empty. readonly (Optional) Boolean – Indicates whether the checkbox portal is unable to be changed by the user. Default: "no".
The following example demonstrates what a checkbox portal might look like. All default values are assumed for optional attributes.
<portal id="name" style="chkNormal" showinvalid="yes" tiptext="Click to equip this weapon"> <checkbox field="grIsEquip" dynamicfield="grStkName"/> </portal>