Skip to content

Kirby 5.0.4

$fields->field()

Get the field object by name and handle nested fields correctly

$fields->field(string $name): Kirby\Form\Field|Kirby\Form\FieldClass

Parameters

Name Type Default
$namerequired string no default value

Return types

Kirby\Form\FieldorKirby\Form\FieldClass

This method modifies the existing $fields object it is applied to and returns it again.

Exceptions

Parent class

Kirby\Form\Fields