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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.