How can I handle html form input (array) like the one below in Python:
<input type='hidden' name='a[]' value='some_value'>
The following doesn’t work:
a_value = form["a"].value
Please help. Many thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
take a look at http://formencode.org/Validator.html#http-html-form-input
input name / value
will be parsed into
UPDATE:
In your case
<input type="hidden" name="item.a" value="5" />will be parsed intoitem['a'] = 5