[ZPT] Editing a field using select tag
Santi Camps
santi at gnome-db.org
Sun May 18 15:39:20 EDT 2003
Hi all,
I've been using zope for one year and, when I can, I prefer use ZPT
instead of DTML. I like put business logic and presentation in two
diferent places.
But I have an existencial doubt. When I use ZPT to edit a record, and
this record have one field represented with a select tag, I haven't
found other way to do it that repeat de <option> tag with two opposite
conditions. Like this:
<select>
<span tal:repeat="record loop" tal:omit-tag="">
<option tal:content="record/title" tal:attributes="value record/id"
tal:condition="is_current_record" SELECTED> </option>
<option tal:content="record/title" tal:attributes="value record/id"
tal:condition="is_not_current_record"> </option>
</span>
</select>
Is there a better way to do this?
Thanks a lot
Santi Camps
More information about the ZPT
mailing list