What happens if tyou do <dtml-var ActionList> ----- Original Message ----- From: "Gitte Wange" <gitte@babytux.dk> To: "Phil Harris" <phil.harris@zope.co.uk> Cc: <zope@zope.org> Sent: Friday, March 30, 2001 12:10 PM Subject: Re: [Zope] Form processing in Zope
On 30 Mar 2001 12:06:05 +0100, Phil Harris wrote:
Why don't you try this?
<dtml-if expr="ActionList == '1'"> Do this <dtml-elif expr="ActionList == '2'"> Do that. </dtml-if>
Notice the single quotes around '1' and '2', if you didn't coerce the variables already then they're going to come in as strings.
Phil
Then I get a NameError
Gitte
----- Original Message ----- From: "Gitte Wange" <gitte@babytux.dk> To: "Phil Harris" <phil.harris@zope.co.uk> Cc: <zope@zope.org> Sent: Friday, March 30, 2001 12:00 PM Subject: Re: [Zope] Form processing in Zope
Believe it or not - I actually understand so far :-)
Now I only have one problem.
I need to test on the value from the select box, eg: The selectbox is names ActionList.
<dtml-if expr="ActionList == 1"> Do this <dtml-elif expr="ActionList == 2"> Do that.
But when I say <dtml-id expr="<dtml-var ActionList> == 1"> I get a syntax error.
Help ?
Gitte
On 30 Mar 2001 11:38:47 +0100, Phil Harris wrote:
Zope works exactly that way.
It creates entries into the REQUEST variable, which by the wonders
of
namespaces/acquisition can be used in the current namespace.
So in your example doing <dtml-var Name> will put the value of the Name form entry into your html output.
hth
Phil
----- Original Message ----- From: "Gitte Wange" <gitte@mmmanager.org> To: <zope@zope.org> Sent: Friday, March 30, 2001 11:17 AM Subject: [Zope] Form processing in Zope
Hello,
I have now found out that my problem isn't just a select box in Zope, but it is all form processing.
I am mostly a PHP programmer so I am used to when you make a text field in a form named e.g. Name it will (when you have hit the submit button and the script you have set as actionscript receives the form) be declared as a variable named Name.
But I guess Zope doesn't work this way.
So how does a dtml document recieve the fields in a form ?
Regards,
-- ************************ Gitte Wange Jensen
System Squid Developer MMManager Aps +45 29 72 79 72
gitte@mmmanager.org ************************
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- ************************ Gitte Wange Jensen
System Squid Developer MMManager Aps +45 29 72 79 72
gitte@mmmanager.org ************************
-- ************************ Gitte Wange Jensen
System Squid Developer MMManager Aps +45 29 72 79 72
gitte@mmmanager.org ************************