Skip to content

Kirby 5.0.4

$field->prev()

Returns the previous item in the collection if available

$field->prev(Kirby\Form\Fields|null $collection = null): Kirby\Form\Field|null

Parameters

Name Type Default
$collection Kirby\Form\Fieldsornull null

Return types

Kirby\Form\Fieldornull

This method does not modify the existing $field object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Form\Field