Skip to content

Kirby 5.0.4

$fieldClass->value()

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

Alias for self::toFormValue()

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

Parameters

Name Type Default
$default bool false

Return type

mixed

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

Parent class

Kirby\Form\FieldClass