[Zope] Q: External method processing (D/H)TML forms?

Rik Hoekstra rik.hoekstra@inghist.nl
Fri, 22 Sep 2000 18:00:01 +0200


> 
> I want to pass input from a DTML form to an external method.  So far
> the DTML is actually just a plain HTML page:
> 
>  <form action="external-method" > 
>   <input name="foobar">
>   <input type=submit value="Process">
>  </form>
> 
> If I fill in "test" in the form, my external method is beging called
> correctly, e.g. the URL is ../external-method?foobar=test as I
> expected.
> 
> But how do I access that "foobar" value from Python in the external
> method?
> 
> It is currenly defined like:
> 
>  def external-method(self):
>     # is there a self.foobar or something?
>     ...
> 
> Any help will be highly appriciated by this Zope newbie!

<untested> try passing it the REQUEST object:

def external-method(self, REQUEST):
   """whatever"""

</untested>