-
Notifications
You must be signed in to change notification settings - Fork 2
Image
Viames Marino edited this page Feb 26, 2026
·
2 revisions
Pair\Html\FormControls\Image renders <input type="image"> (submit button with image source), not an <img> tag.
render(): string- Inherited methods from FormControl:
value(),id(),class(),data(),title().
$imgSubmit = (new \Pair\Html\FormControls\Image('searchByImage'))
->value('/assets/img/search-button.png')
->title('Search');
echo $imgSubmit->render();In HTML, input[type=image] typically uses src, while this control inherits value handling from FormControl.
Verify generated markup against your frontend expectations.
See also: Button, File, FormControl.