button() form()

An <input type="button"> in a form row, for scripts (it does not submit).

form()->button($name, $desc = '', $extra = [], $replace = [])

Options

OptionMeaning
valueText; default the label, translated.
classDefault CLASS_BTN_DEFAULT.
(input options)Every option of input().

Example

Code

return form()
    ->text('coupon')
    ->button('check_coupon', 'Check the coupon', ['data-action' => 'check']);

See also: form/submit, html/button