tag. * * Usage * * * new ListboxField( * $name = "pickanumber", * $title = "Pick a number", * $source = array( * "1" => "one", * "2" => "two", * "3" => "three" * ), * $value = 1 * ) * * * @see DropdownField for a simple tag containing all the appropriate \n"; } }else{ // Listbox was based a singlular value, so treat it like a dropdown. foreach($this->getSource() as $value => $title) { $selected = $value == $this->value ? " selected=\"selected\"" : ""; $options .= "$title"; } } $id = $this->id(); return ""; } /** * Sets the size of this dropdown in rows. * @param int $size The height in rows (e.g. 3) */ function setSize($size) { $this->size = $size; } /** * Sets this field to have a muliple select attribute * @param boolean $bool */ function setMultiple($bool) { $this->multiple = $bool; } } ?>