Drupal form's #tree optionvanniaTue, 09/27/2016 - 13:08
There may be a need to name the form elements in an array structure how the form is built. You can see this in Ubercart checkout pane form's input elements. This is very useful when one has a large multi-part form which can be grouped easily by their POST content's array format.
Eg: panes[delivery][delivery_first_name]
A simple flag on you $form construct array will do the trick. It's the #tree option. For whichever elements you set this #tree option, the element's children will be named with full reference to its parents.
Tag(s)