Jump to content


List Boxes......cont

  • Please log in to reply
1 reply to this topic

#1 glenelkins

  • Members
  • PipPipPip
  • Advanced Member
  • 760 posts
  • LocationBridlington - East Riding of Yorkshire - United Kingdom

Posted 08 June 2006 - 01:53 PM

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
http://thewebsolutionprovider.com - A Solution For Everything Web!

#2 poirot

  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 08 June 2006 - 02:12 PM

I hope this:

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

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.
~ D Kuang

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users