That looks like hard coding it only for the third option. How is it ever
going to select Item One, or Item Two, if those were ever passed as values?
(I've tried putting the <tmpl_if> on all of the lines together, but that
doesn't work).
I've wrestled with this for hours.
Forget multiple values, here is a simpler scenario I have been struggling
with: how would I pass a Boolean value and show a Yes/No Radiobutton
selected properly?
>>How do I select the passed value of a field in an OPTION radiobutton
>>construct in HTML. I am trying to use a database edit screen, where one
>>field should be represented by drop down or radiobuttons. In other
>>words, the correct option should be "SELECTED" based on the previous
>>value passed. See simplified code below.
>
>In your example you should try:
> <OPTION VALUE="Item Three" <tmpl_if
>option>SELECTED</tmpl_if>>Three <!-- need a SELECTED after OPTION
>
>I personally prefer:
>
>my @drop = ( { value => '1', label => 'option 1', select => '1'},
> { value => '2', label => 'option 2' },
> {value => '3', label => 'option 3'};
>
>$template->param ( drop => @drop );
>
>and in the template
>
><select name=drop>
><tmpl_loop drop><option value="<tmpl_var value>" <selected>><tmpl_var
>label>
></tmpl_loop></select>
>
>But it a matter of choice and style how you prefer to do it...
>
>(( Flemming ))
>
>--
>Flemming Mahler Larsen, Media & Portal Technology @ TDC Internet
>http://card.netfactory.dk/ , +45 3552 6452
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]