I am trying to submit a form with 2 fields with the same name but different type. I can identify the correct field I want by the field type or the number. Whats the best way of setting the correct field without iterating through all the fields?
views:
30answers:
1
A:
Here is the signature of set_value() method of HTMLForm class.
set_value(value, name=None, type=None, kind=None,
id=None, nr=None,by_label=False,
# by_label is deprecated
label=None)
As you can see, you could specify type
parameter, useful in this case to select the proper field.
systempuntoout
2010-09-03 20:57:17