$fields->indexOf()
Tries to find the index number for the given element
$fields->indexOf(Kirby\Form\Field|Kirby\Form\FieldClass $needle): int|false
Parameters
Name | Type | Default | Description |
---|---|---|---|
$needlerequired | Kirby\Form\Field orKirby\Form\FieldClass |
no default value | the element to search for |
Return types
int
orfalse
the index (int) of the element or false
This method modifies the existing $fields
object it is applied to and returns it again.
Parent class
Kirby\Form\Fields
inherited from Kirby\Toolkit\Iterator