I’ve seen this HTML notation on blogs but they don’t mention how to use it:
<input name="object[property]" value=""/>
How is it called and how do you take advantage of it?
Do I need a templating engine? can jquery populate a form automatically if I provide the JSON object?
Note: I’ve seen that when I post my form, it provide me the bundling of all the data in a js object. My question is more on the initialisation of the form itself.
Maybe this can help: http://www.thefutureoftheweb.com/blog/use-arrays-with-html-form-inputs
If you do…
…and send the form as-is, your server-side POST variables will look like this:
Even if you have a JSON object defined, you still need something to fill up your form with default values. (such as a templating engine or straight JS)
Here is a fiddle: http://jsfiddle.net/remibreton/2cBQB/1/