At 08:33 PM 11/5/2002 +0100, you wrote:
beno writes:
Okay, I *am* going to write a How-To on this when I get it all figured out with your help. This needs to be done. In DTML, we do this to render the fields:
<dtml-in "form.get_fields()"> <dtml-let field=sequence-item> <tr> <td><dtml-var "field.get_value('title')"></td> <td><dtml-var "field.render()"></td>
etc. How do I do this same thing in Python? Python, usually, is not there to render a form.
In ZPT, it would be
<tr tal:repeat="field here/form/get_fields"> <td tal:content="python: field.get_value('title')" /> <td tal:content="structure field/render" /> </tr>
As you see, it's easier than in DTML.
Actually, I need to do this in Python, since I'm calling the MailHost. I figured out how to do that, but discovered that's not what I wanted <:-) What I *really* need is to be able to call the values the visitor enters into the fields in the form. For example, on the page to which POST sends I would write something like this in DTML: <dtml-var the_variable_the_visitor_filled_in_goes_here> and it would render the information accordingly. I need to do that in *Python*, not ZPT. How? TIA, beno