container() form()
A form row holding any HTML you give (a table, a widget, a text), with the label of the row.
form()->container($text, $desc = '', $extra = [], $replace = [])Options
| Option | Meaning |
|---|---|
$text | HTML of the row (trusted). |
desc | Label. |
ckeditor | Make the block an inline CKEditor (contenteditable). |
edit_link | Edit link next to the content. |
Example
Code
$history = table([1 => ['id' => 1, 'date' => '2026-11-01', 'event' => 'Created']], ['no_pages' => 1, 'condensed' => 1])
->text('date')
->text('event');
return form()
->text('title')
->container((string) $history, 'History')
->container(html()->alert(['alert' => 'info', 'body' => 'Changes are saved as a draft.']), '');