Jump to content

auFormMultiSelect: Difference between revisions

From auWiki
New page: {{RightTOC}} FormMultiSelect Category:Class Category:PHP The auFormMultiSelect class is part of the auLib package. It is defined in the auForm.php file. ;Hi...
 
 
Line 14: Line 14:
==Public Functions==
==Public Functions==
===new auFormMultiSelect===
===new auFormMultiSelect===
<code>new auFormMultiSelect($name, ''$label'', ''$tooltip'', ''$values'', ''$default'', ''$type'')</code>
<code>new auFormMultiSelect($name, ''$label'', ''$tooltip'', ''$required'', ''$values'', ''$default'', ''$type'')</code>


Creates a multiple-value selection field.
Creates a multiple-value selection field.
Line 20: Line 20:
* ''$label'' = Label to display with the field.  Default is blank.
* ''$label'' = Label to display with the field.  Default is blank.
* ''$tooltip'' = Tooltip text to display when the mouse is over the label.  Default is none.
* ''$tooltip'' = Tooltip text to display when the mouse is over the label.  Default is none.
* ''$required'' = Whether a value is required in this field (display only).  Default is not required.
* ''$values'' = Associative array of possible values (value => display text).  If values and display text are all identical, a normal array can be passed through auFormSelect::ArrayIndex($array) to get it into the appropriate format.  Default is no possible values.
* ''$values'' = Associative array of possible values (value => display text).  If values and display text are all identical, a normal array can be passed through auFormSelect::ArrayIndex($array) to get it into the appropriate format.  Default is no possible values.
* ''$default'' = Array of default values for this field.  Default is for no values to be selected.
* ''$default'' = Array of default values for this field.  Default is for no values to be selected.
* ''$type'' = Type of field -- set to _AU_FORM_MULTI_LIST to use list box.  Default is _AU_FORM_MULTI_CHECK for checkboxes.
* ''$type'' = Type of field -- set to _AU_FORM_MULTI_LIST to use list box.  Default is _AU_FORM_MULTI_CHECK for checkboxes.

Latest revision as of 13:21, 12 May 2008

The auFormMultiSelect class is part of the auLib package. It is defined in the auForm.php file.

Hierarchy

Usage

This class is used to add a multiple-value selection field to a form. Create an object from this class and add it to an auFormContainer object.

Public Functions

new auFormMultiSelect

new auFormMultiSelect($name, $label, $tooltip, $required, $values, $default, $type)

Creates a multiple-value selection field.

  • $name = Name to submit the field as.
  • $label = Label to display with the field. Default is blank.
  • $tooltip = Tooltip text to display when the mouse is over the label. Default is none.
  • $required = Whether a value is required in this field (display only). Default is not required.
  • $values = Associative array of possible values (value => display text). If values and display text are all identical, a normal array can be passed through auFormSelect::ArrayIndex($array) to get it into the appropriate format. Default is no possible values.
  • $default = Array of default values for this field. Default is for no values to be selected.
  • $type = Type of field -- set to _AU_FORM_MULTI_LIST to use list box. Default is _AU_FORM_MULTI_CHECK for checkboxes.