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

OptionMeaning
$textHTML of the row (trusted).
descLabel.
ckeditorMake the block an inline CKEditor (contenteditable).
edit_linkEdit link next to the content.

Example

Date Event
2026-11-01 Created
Changes are saved as a draft.

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.']), '');

See also: form/func, form/info