[Zope] Form-Through-Script
Tom Von Lahndorff
tom at modscape.com
Mon Aug 13 16:20:30 EDT 2007
I think you want:
<form action="renumberTheCart(here/CheckOutAfterEditStuff)"
method="post" enctype="multipart/form-data">
<td>
<form action=http://example.com/s/renumberTheCart" method="post">
<input type="hidden" name="doc" value="" tal:attributes="value here/
CheckOutAfterEditStuff" />
<p metal:use-macro="here/CheckOutAfterEditStuff/macros/main" />
</td>
(my tal may be a bit off)
On Aug 13, 2007, at 4:09 PM, tonylabarbara at aol.com wrote:
> No, it should work the way it is...that is a URL I passed. I
> changed it to an absolute URL just to double-check, and got
> basically the same error:
>
> Invalid request
> The parameter, doc, was omitted from the request.
>
> How do I pass the parameter, which in my case is quite long and
> stashed neatly away in a PT macro?
>
> <td tal:define="docs here/CheckOutAfterEditStuff">
> <form action=http://example.com/s/renumberTheCart?doc=docs"
> method="post">
> <p metal:use-macro="here/CheckOutAfterEditStuff/macros/main" />
> </td>
>
> TIA,
> Tony
>
> -----Original Message-----
> From: Andreas Jung <lists at zopyx.com>
> To: tonylabarbara at aol.com; zope at zope.org
> Sent: Mon, 13 Aug 2007 3:55 pm
> Subject: Re: [Zope] Form-Through-Script
>
>
> --On 13. August 2007 15:39:40 -0400 tonylabarbara at aol.com wrote:
>
> >
> > Hi;
> > I have a form that I need to send to a script and then send off
> to a URL
> > (PayPal). I need to process it through the script to renumber
> things for
> > PP. How do I do this? I imagine I add an element to the PT like so:
> >
> > <form action="renumberTheCart(here/CheckOutAfterEditStuff)"
> method="post">
> >
> > but I need to pass a parameter "doc", which, of course, is the
> document
> > I'm submitting. So I tried this:
> >
> > <form action="renumberTheCart(here/CheckOutAfterEditStuff)"
> method="post">
> > <p metal:use-macro="here/CheckOutAfterEditStuff/macros/main" />
>
> You might check out the basics about HTML forms first. The 'action'
> parameter is an URL and *not* some Python-like function call. You
> specify the destination URL inside the action attribute and pass
> the parameters as *hidden* form parameters to the URL - either
> using method GET or POST.
>
> You'll find more on forms in any HTML tutorial. Start from here:
>
> <http://www.w3schools.com/html/html_forms.asp>
>
> -aj
> AOL now offers free email to everyone. Find out more about what's
> free from AOL at AOL.com.
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070813/70ba20f8/attachment.htm
More information about the Zope
mailing list