Jump to content


This topic is now archived and is closed to further replies.


List Boxes......cont

Recommended Posts

ok so why is this not working?:

<label for="db_table_list">Tables</label><select name="db_table_list" id="db_table_list" size="2" multiple>{foreach from=$db_table_list item=i key=k}<option value={$i}>{$i}</option>{/foreach}</select>

all it does is create a real thin box like it wants to add the options in but cant. If i take out size="2" and multiple it works fine as a drop down, but thats not what i need

Share this post

Link to post
Share on other sites
I hope this:

[code]{foreach from=$db_table_list item=i key=k}<option value={$i}>{$i}</option>{/foreach}[/code]

Is pseudocode, else it won't work obviously.

Maybe it's a HTML display problem. multiple should be fine, but it's recommended to use multiple="multiple". Also try to open the generated source and see if the option values are in there.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.