I have a json field and I want to turn each key-value in the json field
into an HTML field-value.
For example,
{"add1":"abc", "add2":"xyz"}
into
INPUT( _name="json_field[add1]", _value="abc")
INPUT( _name="json_field[add2]", _value="xyz")
in HTML.
However, when the form is POST-ed, the results are:
{"json_field[add1]": "abc", "json_field[add2]": "xyz"}
But I would like it to be:
json_field = {"add1": "abc", "add2": "xyz"}
How to I get web2py to receive POST-ed multidimensional arrays from a form?
I don't know where to start.
If it helps, my form is created using SQLFORM and modified to include
individual fields for each json key-value. The form is POST-ed via submit
button, without any javascript trapping/intervention.
Thank you for your help!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.