Skip to content

Kirby 6.0.1

$fields->indexOf()

Correct position detection for objects. The method will automatically detect objects or ids and then search accordingly.

$fields->indexOf(string|Field $needle): int|false

Parameters

Name Type Default
$needlerequired stringorKirby\Form\Field no default value

Return types

intorfalse

Parent class

Kirby\Form\Fields inherited from Kirby\Cms\Collection