[Zope] Syntax for zpt form and submitting to a dtml method

Laura McCord Laura.McCord at doucet-austin.com
Tue Sep 21 16:35:48 EDT 2004


Perfect. <dtml-var "REQUEST['subject']"> worked. 

Thanks so much.

-----Original Message-----
From: Jonathan Hobbs [mailto:toolkit at magma.ca] 
Sent: Tuesday, September 21, 2004 3:38 PM
To: Laura McCord; zope at zope.org
Subject: Re: [Zope] Syntax for zpt form and submitting to a dtml method



----- Original Message ----- 
From: "Laura McCord" <Laura.McCord at doucet-austin.com>
> For learning purposes if I have a zope page tamplate form with a 
> <select> using a dtml method as a action:
> 
> <form action="dtml_method">
>  <select name="subject">  
>                <option>Select</option>
>                <option tal:repeat="result here/view_subject" 
>                      value="" tal:attributes="value result/subject"
>                      tal:content="result/subject">data</option>
>                </SELECT>
>  <input type="submit" name="submit" value="submit">
> </form>
> 
> How would I access the value of subject in the dtml_method:
> 
>  <dtml-var subject>
> 
> The above did not work. Any Ideas?

Try:

<dtml-var "REQUEST.get('subject', 'None')">

or

<dtml-var "REQUEST['subject']">


Jonathan




More information about the Zope mailing list