ArtiGrid
Step Forms
Multi-step forms allow you to break long forms into smaller, more manageable sections. This improves user experience by reducing cognitive load and making complex data entry less overwhelming. The wizard mode provides a step-by-step progression with a visual progress bar, while tabs mode allows users to navigate between sections freely. You can customize the navigation position, mode, and labels to match your application's design.
<?php
$grid = new ArtiGrid();
$grid->table('employees')
->steps([
[
'title' => 'Personal Data',
'icon' => 'fa fa-user',
'description' => 'Complete your personal information',
'fields' => ['lastName', 'firstName', 'extension', 'email']
],
[
'title' => 'Address',
'icon' => 'fa fa-home',
'fields' => ['officeCode', 'reportsTo', 'jobTitle']
]
], [
'mode' => 'wizard', // tabs, pills, buttons, wizard
'navPosition' => 'top', // top, bottom, both
'vertical' => false,
'labels' => [
'prev' => 'Former',
'next' => 'Following',
'finish' => 'Keep'
]
]);
echo $grid->render('insert');
?>