Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

html_options with selection box in multiple mode

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
Mephisto
Smarty n00b


Joined: 11 May 2005
Posts: 2

PostPosted: Wed May 11, 2005 4:57 pm    Post subject: html_options with selection box in multiple mode Reply with quote

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
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu May 12, 2005 7:31 am    Post subject: Reply with quote

sure, just pass an array of values as the "selected"-attribute.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mephisto
Smarty n00b


Joined: 11 May 2005
Posts: 2

PostPosted: Thu May 12, 2005 8:07 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP