-
Notifications
You must be signed in to change notification settings - Fork 2
Hidden
Viames Marino edited this page Feb 26, 2026
·
2 revisions
Pair\Html\FormControls\Hidden renders <input type="hidden">.
render(): string- Inherited methods from FormControl:
value(),id(),data(),form().
$csrf = (new \Pair\Html\FormControls\Hidden('csrfToken'))
->value($token)
->id('csrf-token');
echo $csrf->render();Use hidden controls for state/IDs/tokens, but never trust them without server-side checks.
See also: FormControl, Form.