Submitting text_input helper as part of an array

Hello all,

I’m trying to define 4 form fields that will submit an array like this:
%{"data" => %{"pin" => ["1", "2", "3", "4"]}}

That is achievable using ` tags.

But I want to do that using the HTML helpers that Phoenix provides, namely text_input or number_input. Mostly to take advantage of facilities provided for form_for like working with changesets.

Is it possible to indicate that a text_input is part of an array?
How would you solve this?

Manually supplying a name to those inputs will work. If you want to keep the automatic naming around you can do input_name(f, :name) <> "[]"

Excellent!

Thank you.