FormBuilderForm::getChildrenFlat()

Return a flattened (non structured) array of all fields in the form

Fieldset structure is instead represented by an opening fieldset which is closed with a field of the same name with _END appended to it.

This function also sets a 'level' (integer) and 'parent' (FormBuilderField) to each child, for convenience.

Usage

// basic usage
$array = $formBuilderForm->getChildrenFlat();

// usage with all arguments
$array = $formBuilderForm->getChildrenFlat(array $options = []);

Arguments

NameType(s)Description
$options (optional)array

Options to modify return value:

  • includeNestedForms (bool): Include fields from nested FormBuilderForm fields? Default:false
  • skipTypes (array): Skip fields having these types Default:[]
  • level (int): For internal recursion use

Return value

array

Associative array indexed by field name


FormBuilderForm methods and properties

API reference based on ProcessWire core version 3.0.252