Jump to content

List Boxes......cont


glenelkins

Recommended Posts

ok so why is this not working?:

[code]
<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>
[/code]

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
Link to comment
https://forums.phpfreaks.com/topic/11489-list-boxescont/
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.
Link to comment
https://forums.phpfreaks.com/topic/11489-list-boxescont/#findComment-43187
Share on other sites

Archived

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

×
×
  • Create New...

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.