[ZDP] Selecting an option from a drop-down list at runtime in
Thu, 25 Jul 2002 19:01:15 -0400
Richard McKinley wrote:
> I want to be able to add the SELECTED HTML attribute to a specific
> option which is determined only at runtime. Basically if the current
> value of research_purpose field equals the value of the purpose variable
> I want to insert the select attribute at this point.
> <dtml-if expr="<dtml-var "RESEARCH_PURPOSE"> == <dtml-var "PURPOSE">">
> However, I get a syntax error. How do you usually test the condition
> when 2 variable are equal?
<dtml-if expr="RESEARCH_PURPOSE == PURPOSE">SELECTED</dtml-if>
Note that is question is better asked on the main Zope list
(firstname.lastname@example.org). The ZDP list is kinda dead.
Chris McDonough Zope Corporation
"Killing hundreds of birds with thousands of stones"