Skip to content
Viames Marino edited this page Feb 26, 2026 · 2 revisions

Pair framework: Hidden

Pair\Html\FormControls\Hidden renders <input type="hidden">.

Methods

  • render(): string
  • Inherited methods from FormControl: value(), id(), data(), form().

Example

$csrf = (new \Pair\Html\FormControls\Hidden('csrfToken'))
    ->value($token)
    ->id('csrf-token');

echo $csrf->render();

Notes

Use hidden controls for state/IDs/tokens, but never trust them without server-side checks.

See also: FormControl, Form.

Clone this wiki locally