box(), box_with_link() form()
A row that prints ready HTML from $replace[name] (a box built elsewhere), with an optional edit link.
form()->box($name, $desc = '', $extra = [], $replace = [])
form()->box_with_link($name, $desc = '', $link = '', $replace = [])Options
| Option | Meaning |
|---|---|
edit_link | URL, or a $replace key holding it (box_with_link() takes it as an argument). |
desc | Label. |
Example
Code
$replace = [
'group_box' => html()->select_box('group', [1 => 'Admins', 2 => 'Editors'], 2),
'groups_link' => '#groups',
];
return form($replace)
->box('group_box', 'Group')
->box_with_link('group_box', 'Group (with a link)', 'groups_link');Notes
- The HTML is printed as it is: build it with escaping helpers, never from raw user text.
See also: form/container, form/info