In this gist I describe how I use arrays to create web forms with JavaScript React, the same pattern can be use with any JS lib or, vanilla js.
First, what kind of form are we talking about? §I applied this method in forms up to twelve inputs,
including type text, email, select, select multiple, date rage, number range, checkbox.
In a gist, create an array and each array indice is an object that describes how a form input of any
given type should render. I put this array in my state and on each input on change I map my fields array and
update it's value, onChange I can also call async validation functions that will map and update the fields array
with the current input validity.