Closed comalex closed 8 years ago
There's a pull request #453 documenting it. Here's a copy-paste of the solution:
// Use standard 'Object' editor for list items.
Form.editors.List.Object = Form.editors.Object;
// Use standard 'NestedModel' editor for list items.
Form.editors.List.NestedModel = Form.editors.NestedModel;
thank, but how i can change atribute name? for example first:
<input name="article-0">
<input name="id-0">
another:
<input name="article-1">
<input name="id-1">
?
I'm not sure what you're trying to do. You either want two lists, or one list with another editor with two fields.
i want to do inline-formset. To save the result on a server i need that all input have different name. If i click button "add" generates the same name...
Can't you manage arrays on the server? I mean, if you receive something like this:
{
things: [
{
article: 'article-1-value',
id: 'article-1-id'
},
{
article: 'article-2-value',
id: 'article-2-id'
},
]
}
It seems cleaner than guessing input names.
yes, it sounds good, thank
Closing as question appears to have been answered.
hi, i want use list with nested model like it . How can i do it? thank