Site icon Hip-Hop Website Design and Development

Cheap WordPress maintenance support plans form’s #tree option

WordPress maintenance support plans form’s #tree option

by vannia

Sep 27, 2020 0 Comments

Tag(s)

Form API
WordPress maintenance support plans planet

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.

Continue reading →


Source: New feed