HTML_OOH_Form bug

From: Date: Fri, 30 Aug 2002 13:20:49 +0000
Subject: HTML_OOH_Form bug
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8745@lists.php.net to get a copy of this message
Hello, HTML_OOH_Form/elements/form_element_selectobject.php in latest cvs is missing the function addOption() which gets called from addOption() in form.php (line 1626). It can be used to dynamically add options to select or combobox. This diff works for now. jan Index: form_element_selectobject.php =================================================================== RCS file: /repository/pear/HTML_OOH_Form/elements/form_element_selectobject.php,v retrieving revision 1.8 diff -u -u -r1.8 form_element_selectobject.php --- form_element_selectobject.php 1 Aug 2002 11:42:31 -0000 1.8 +++ form_element_selectobject.php 30 Aug 2002 13:18:34 -0000 @@ -98,6 +98,23 @@ } // end func setOptions /** + * Adds an option to the option list + * + * @param string $label + * @param string $value + * @return boolean + * @see $options + */ + function addOption($label, $value = '') + { + if (is_array($this->options)) { + $this->options[$value] = $label; + return true; + } + return false; + } // end func addOption + + /** * FIXME * @param string $value * @return string $selected Returns ' selected' if the given value is selected

« previous php.pear.dev (#8745) next »