html_options multiple

From: Date: Mon, 17 Mar 2003 09:41:07 +0000
Subject: html_options multiple
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8685@lists.php.net to get a copy of this message
Hi all I've modified the html_options file to allow multiple select lists (I know passing an array as $selected would allow multiple option but there seemed to be no way of telling if to display as a multiple list). I also added a class parameter for styling. I thought this might be of use to somebody. The changes are. line line 39, change the line to $html_result = sprintf("<select class=\"%s\" name=\"%s\"%s>\n%s</select>\n",$class,$name,($multiple == 1)?' multiple':'',$html_result); This allows you to use the attributes multiple=1 to use a multiple select and class=cssclass for styling. Thoughts? Matt

« previous php.smarty.general (#8685) next »