|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Mephisto Smarty n00b
Joined: 11 May 2005 Posts: 2
|
Posted: Wed May 11, 2005 4:57 pm Post subject: html_options with selection box in multiple mode |
|
|
Smarty offers the 'html_options' statement to provide standard selection boxes. In case of a selection box in multiple mode I need to preselect more than one entry. Is there any way to provide this with Smarty?
Of course, I could create the corresponding HTML code and store it in a variable which is included in the template, but this is somehow unclean, I think.
Ciao, Meph |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu May 12, 2005 7:31 am Post subject: |
|
|
sure, just pass an array of values as the "selected"-attribute. |
|
Back to top |
|
Mephisto Smarty n00b
Joined: 11 May 2005 Posts: 2
|
Posted: Thu May 12, 2005 8:07 am Post subject: |
|
|
Thanks.
Temporary lapse of brain. I tried it using an array before but it didn't work. I just forgot the "multiple" option in the SELECT definition.
Ciao, Meph |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|