Lines Matching defs:values
621 * The list of values can be strings, arrays of (value,text),
622 * or an associative array with the values as keys and labels as values.
624 * If the list of values is an associative array, the selected item must be
630 * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
631 * or an associative array with the values as keys and labels as values.
641 function form_makeMenuField($name, $values, $selected = '', $label = null, $id = '', $class = '', $attrs = array())
645 reset($values);
647 if (is_string(key($values))) {
648 foreach ($values as $val => $text) {
652 if (is_integer($selected)) $selected = $values[$selected];
653 foreach ($values as $val) {
669 * The list of values can be strings, arrays of (value,text),
670 * or an associative array with the values as keys and labels as values.
671 * Items are selected by supplying its value or an array of values.
676 * @param string[]|array[] $values The list of values can be strings, arrays of (value,text),
677 * or an associative array with the values as keys and labels as 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())
691 reset($values);
698 if (is_string(key($values))) {
699 foreach ($values as $val => $text) {
703 foreach ($values as $val) {