V
V
Vitaly Stolyarov2016-12-27 13:21:02
Play Framework
Vitaly Stolyarov, 2016-12-27 13:21:02

Group of inputs in DynamicForm?

POST data from fields is transmitted from the client

<input name="inpt[]" value="val1">
<input name="inpt[]" value="val2">

But if you try to take this array from DynamicForm under the name inpt, it returns null , since these fields are not named under the same group, but as independent fields of the format inpt[0 , inpt[1 . The most interesting thing is that they can only be obtained by adding a square bracket and an index, and without closing this bracket (looks like a bug).
Then it turns out that you need to manually sort through these fields, or are there methods built into DynamicForm to get such groups?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question