define options for html_options in template?
| From: | Ajay Sharma | Date: | Thu, 16 Oct 2003 18:08:40 +0000 |
| Subject: | define options for html_options in template? | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10362@lists.php.net to get a copy of this message | ||
Hello,
how do you handle forms with a lot of <select> drop downs?
Right now when the designer hands me a form with about a dozen different
dropdown boxes, I have to take all those and stick them in a dozen PHP
arrays, then assign each one to a smarty variable and print it out like:
<select name=blah>
{html_options options=$blah_options selected=$blah}
</select>
Then if someone has to change the options it comes back to me because I
have them defined in the PHP code. How do you shift that stuff back
into the templates?
Actually, as I was typing this I think I may have come up with my own
solutions using inline php code with {php}{/php}, hmm.... I'm still
curious how others handle this though.
later,
ajay