Skip to content

Kirby 6.0.0

$fields->append()

Appends an element to the data array

$fields->append(string|Field ...$args): Fields

Parameters

Name Type Default
...$args stringorKirby\Form\Field no default value

Return type

Kirby\Form\Fields

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

Examples

$collection->append($object);
$collection->append('key', $object);