link() form()
A link button in a form row (Cancel, Back, Help), the text from the first argument.
form()->link($name = '', $link = '', $extra = [], $replace = [])Options
| Option | Meaning |
|---|---|
$link | URL (or a $replace key holding it). |
class, icon, target, title, rewrite | Look and target; default CLASS_BTN_MINI. |
desc | Label of the row; without it the row has no label. |
Example
Code
return form(['back_link' => '#list'])
->text('title')
->row_start()
->save()
->link('Cancel', '#list', ['class' => 'btn btn-default btn-outline-secondary', 'icon' => 'fa fa-times'])
->row_end();See also: form/submit, form/tbl_link, html/a