marioizquierdo / jquery.serializeJSON

Serialize an HTML Form to a JavaScript Object, supporting nested attributes and arrays.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django template's form field names problem

durdenk opened this issue · comments

Hi,
Django populates form with a prefix and name
if prefix is "form1" and name is "company", it's names is form1-company
if its a nested form same example populates with an id , it becomes form1-0-company, form1-1-company, form1-2-company ...
Is it possible to use this library with above examples.

No, sorry, this library doesn't allow custom syntax.

You may want to look into other libraries like https://github.com/macek/jquery-serialize-object, that have FormSerializer.patterns. That may suit your use case better. Good luck!