quickform multiple select problem

From: Date: Mon, 12 May 2003 14:28:39 +0000
Subject: quickform multiple select problem
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16184@lists.php.net to get a copy of this message
Hi, With the latest (non CVS) quickform this: $choices = array( 'sph_home' =>'SPH Homepage', 'sph_news' =>'SPH Nieuws', 'jsf_home' =>'JSF Homepage', 'jsf_news' =>'JSF Nieuws', 'lhc_home' =>'LHC Homepage', 'lhc_news' =>'LHC Nieuws' ); $select = &$form->addElement('select',"items[$news->news_id][show_on]", 'toon op', $choices); $select->setMultiple(true); $select->setSize(6); results in this: <select name="items[1][show_on][]" multiple="multiple" size="6"> <option value="sph_home" 0="selected">SPH Homepage</option> <option value="sph_news" 0="selected">SPH Nieuws</option> <option value="jsf_home" 0="selected">JSF Homepage</option> <option value="jsf_news" 0="selected">JSF Nieuws</option> <option value="lhc_home">LHC Homepage</option> <option value="lhc_news">LHC Nieuws</option> </select> Clearly the 0="selected" is incorrect. With Quickforms 2 this works fine. Regards, Jeroen

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