Share » Forums » Developer » The select="selected" problem

The select="selected" problem

The select="selected" problem

Sunday 22 June 2003 7:15:17 am - 3 replies

Modified on Sunday 22 June 2003 7:16:43 am by Esben Maaløe

Author Message

Esben Maaløe

Monday 23 June 2003 10:52:26 am

Come on - it's an interesting question :)

Björn Dieding@xrow.de

Monday 23 June 2003 9:04:09 pm

Just to give you a rough idea

{let countries=array('Germany','_Norway')
selected='Germany'
}
....
{section loop=$countries}
{switch}
<option value="{$:item}"
{case match=eq($:item,$:selected)}
selected
{case}{/case}
{/swtich}
>{$:item}</option>
{/section}

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Esben Maaløe

Tuesday 24 June 2003 5:55:09 am

Thanks Björn - that is certainly more elegant.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu