HiddenField
class HiddenField extends BaseControl
Hidden form control used to store a non-displayed value.
Methods
__construct($persistentValue = null)
No description
mixed
getValue()
Returns control's value.
setNullable(bool $value = true)
Sets whether getValue() returns null instead of empty string.
bool
isNullable()
No description
Html|string
getControl()
Generates control's HTML element.
Html|string|null
getLabel(string|Stringable|null $caption = null)
Bypasses label generation.
void
addError(string|Stringable $message, bool $translate = true)
Adds error message to the list.
Details
at line 26
__construct($persistentValue = null)
No description
at line 44
Control
setValue(mixed $value)
internal |
Sets control's value.
at line 62
mixed
getValue()
Returns control's value.
at line 71
HiddenField
setNullable(bool $value = true)
Sets whether getValue() returns null instead of empty string.
at line 78
bool
isNullable()
No description
at line 84
Html|string
getControl()
Generates control's HTML element.
at line 99
Html|string|null
getLabel(string|Stringable|null $caption = null)
Bypasses label generation.
at line 108
void
addError(string|Stringable $message, bool $translate = true)
Adds error message to the list.