Skip to content

Kirby 5.0.4

$field->value()

Returns the value of the field if it has a value otherwise it returns null

Alias for self::toFormValue()

$field->value(bool $default = false): mixed

Parameters

Name Type Default
$default bool false

Return type

mixed

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

Parent class

Kirby\Form\Field