[Zope] - Arbitrary length/named parameters
Sharon Lippey
sharon@rmb.com.au
Fri, 22 Jan 1999 12:11:56 +1100
I have a dtml form with an arbitrary number of input fields with names
which cannot be known in advance, calling a python method. (e.g
serverName/cgi-bin/pythonMethod?name1=var1&name2=var2...)
Python supports the sending of arbitrary, named variables to a function
using functionName(**listOfKeywordValuePairs) but this will not work
from Zope, I assume because the python syntax requires that the list
must be sent to the function as the last parameter.
Can anyone tell me whether this is the problem, and if so, how to
specify that the parameters are to be sent last?
The other possible solution is to send python a single sequence with a
known name (I suppose defined in the dtml namespace) and send this to
python containing keyword/value pairs. (e.g
serverName/cgi-bin/pythonMethod?inputs = [name1:value1,..] Can anyone
tell me how to instruct an html form to add its input elements to an
array/sequence?
Thanks,
Sharon