Lines Matching defs:selected
623 * An item is selected by supplying its value or integer index.
624 * If the list of values is an associative array, the selected item must be
632 * @param string|int $selected default selected value, string or index number
641 function form_makeMenuField($name, $values, $selected = '', $label = null, $id = '', $class = '', $attrs = array())
649 $options[] = array($val, $text, (!is_null($selected) && $val == $selected));
652 if (is_integer($selected)) $selected = $values[$selected];
657 $options[] = array($val, $text, $val === $selected);
671 * Items are selected by supplying its value or an array of values.
678 * @param array|string $selected value or array of values of the items that need to be selected
687 function form_makeListboxField($name, $values, $selected = '', $label = null, $id = '', $class = '', $attrs = array())
692 if (is_null($selected) || $selected == '') {
693 $selected = array();
694 } elseif (!is_array($selected)) {
695 $selected = array($selected);
700 $options[] = array($val, $text, in_array($val, $selected));
710 $options[] = array($val, $text, in_array($val, $selected), $disabled);
1063 * _options : Array of (value,text,selected) for the menu.
1065 * Only one item can be selected.
1084 $selected = false;
1093 if (!empty($select) && !$selected) {
1094 $p .= ' selected="selected"';
1095 $selected = true;
1112 * _options : Array of (value,text,selected) for the list.
1136 if (!empty($select)) $p .= ' selected="selected"';