<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I can't seem to get a reasonable solution to the
option selected problem, basically I'm going through a list, adding options for
each item, and if the one is selected then add a selected attribute</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>this is what I'm doing:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2><select name="category"><BR><option
tal:repeat="cat cat_list" value="$cat/id"><BR>
$cat/name<BR></option><BR></select></FONT></DIV>
<DIV> </DIV></FONT></DIV>
<DIV><FONT face=Arial size=2>and what I think I need is :</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2><select name="category"><BR><option
tal:repeat="cat cat_list" tal:attributes="selected if: eq: $cat/id $item/cat/id
then: true else: false" value="$cat/id"><BR>
$cat/name<BR></option><BR></select></FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is my first attempt at this, please don't
laugh, I just started today :)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Simon</FONT></DIV></BODY></HTML>