HTML:
<input type="text" name="blah-0" value="test" />
<input type="text" name="blah-1" value="another test" />
控制器:
class myvalidator(formencode.Schema):
allow_extra_fields = True
filter_extra_fields = True
test = formencode.ForEach(formencode.validators.String())
def form_posted(self):
form_result = myvalidator().to_python(request.params)
print form_result
我想要得到的是一个返回的列表。就像是:
> print form_result['blah']
['test', 'another test']
我究竟做错了什么?