[ZPT] <select><option selected> question

Evan Simpson evan@digicool.com
Mon, 16 Jul 2001 12:00:57 -0400


Peter Bengtsson wrote:

> Even, is this the "best" way to do it?
> 
> 
>><select name="location">
>>    <option tal:define="template_location template_info/location"
>>                 tal:repeat="location here/locations">
>>                 tal:condition="location"
>>                 tal:attributes="value location/ID;selected
>>python:template_location==location.name"
>>                 tal:content="location/name"
>>    >Location Name</option>
>></select>

I can't think of a better way, at the moment.

Cheers,

Evan @ digicool