$fields->add()
Adds a single object or an entire second collection to the current collection
$fields->add(Collection|Field $object): Fields
Parameters
| Name | Type | Default |
|---|---|---|
| $objectrequired | Kirby\Cms\Collection<Kirby\Form\Field>orKirby\Form\Field |
no default value |
Return type
This method modifies the existing $fields object it is applied to and returns it again.
Parent class
Kirby\Form\Fields
inherited from Kirby\Cms\Collection