Skip to content

Kirby 3.9.8

$fields->set()

Adds a new element to the collection

$fields->set(mixed $key, mixed $value = null): Kirby\Form\Fields

Parameters

Name Type Default Description
$key * mixed string or array
$value mixed null

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\Toolkit\Collection