Re: [SMARTY] custom "value" with {html_select_date}?
| From: | Monte Ohrt | Date: | Tue, 21 May 2002 15:45:59 +0000 |
| Subject: | Re: [SMARTY] custom "value" with {html_select_date}? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4329@lists.php.net to get a copy of this message | ||
{html_select_date} is going to display whatever you assign to it.
$values= array(1,2,3,4,5);
$output= array('01','02','03','04','05);
$smarty->assign('values',$values);
$smarty->assign('output',$output);
{html_select_date values=$values output=$output}
S. Joyce wrote:
Hello. I'm working with {html_select_date}, and I'm not clear on whether or not this is possible after looking at the template language section of the manual. Is it possible for {html_select_date} to generate a list of _values_ that match the list of displayed items? What I want to generate is <select name="Date_Month"> <option value="January">January</option> ... <select name="Date_Day"> <option value="1">01</option> ... <select name="Date_Year"> <option value="2001">2001</option> ... In other words, to generate the name (or abbreviated name) of the month as the value for the month drop down, instead of the numeric month id. I realize if it's not possible, I can get around this with my form processing back in PHP, but I was hoping not to have to do so. TIA. sjlist@heidelberg.edu-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.