tab_start(), tab_end() form()
Split a long form into tabs: fields between tab_start() and tab_end() go into one tab of html()->tabs().
form()->tab_start($name = '', $extra = [])
form()->tab_end($extra = [])Options
| Option | Meaning |
|---|---|
$name | Tab title (and id). |
tabs (form option) | Options of html()->tabs() for the whole set: class, selected, show_all, no_headers. |
Example
Code
return form(['title' => 'Spring sale', 'meta_title' => 'Sale'])
->tab_start('Content')
->text('title')
->textarea('text', ['rows' => 3])
->tab_end()
->tab_start('SEO')
->text('meta_title')
->text('meta_description')
->tab_end()
->save();See also: html/tabs, demo:form/tabs