Hi List!

I've been trying without success to pass from a form in ZPT to an
external method an undefined list of parameters (*args).

An example:

def external_method(var_fix,*args):
  return 'Vals',var_fix,args
...
file _sub_html_:

<FORM ACTION="external_method" METHOD="POST" ENCTYPE="multipart/form-data">

<input type="text" name="var_fix" value="">
<input type="hidden" name="arg1" value="test1">
<input type="hidden" name="arg2" value="test2">

<INPUT TYPE="SUBMIT" VALUE="Submit">
</FORM>

returns typed value for var_fix and () for args. However, if I do:

def external_method(var_fix,arg1,arg2,*args):
 return "Vals",var_fix,arg1,arg2,args

it returns values of arg1 and arg2. But my problem is that the number
args cannot be fixed since such arguments depends on other page.

I hope one can understand it. And I'd appreciate very much any attention.
Many thanks in advance.

Cheers,
Alan
--
Alan Wilter S. da Silva, D.Sc. - Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
http://www.bio.cam.ac.uk/~awd28<<
_______________________________________________
Zope maillist  -  Zope@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 )

Reply via email to