Hmm, this doesn't appear to work.
Let me explain what I'm trying to do.
I have a Z SQL Method called selectmoduleinfoMethod that contains the SQL:
SELECT * FROM RECMGR_EL_MODULE_Query WHERE MODCODE = <dtml-sqlvar
This recordset is returned to a dtml form to populate the fields ready for
One of the database table entries returned from this query is the value of
MODLEVEL, this modlevel can be one of seven choices that appear in a select
list. However I'd like the one returned from the database to appear as
selected in the form for editing.
As far as I can see the example you gave me does not retrieve the value of
MODLEVEL from the returned SQL recordset it only checks for its existence
and consequently cannot test for the conditions.
Any Ideas how I may resolve this?
From: Jaroslav Lukesh [mailto:[EMAIL PROTECTED]
Sent: 20 June 2006 12:29
To: [EMAIL PROTECTED]; email@example.com
Subject: RE: [Zope] Nested dtml tags
> [EMAIL PROTECTED] On Behalf Of Jonathan Bowlas
> How can I do this with dtml?
> <select name="MODLEVEL" size="1">
> <dtml-if expr="<dtml-var name="MODLEVEL"> == 1"> #I need an
> alternative to this.
> <option value="1" selected="selected">1</option>
> <option value="2"><2</option>
> Etc, etc.
<select name="MODLEVEL:int" size="1">
<option value="1" <dtml-if expr="MODLEVEL ==
<option value="2" <dtml-if expr="MODLEVEL ==
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -