Quick Create

After enable this feature in the grid, a form will be added to the table header to create the data. For some simple form pages, it is convenient to quickly create data without jumping to the create page.

To enable quick create:

$grid->quickCreate(function (Grid\Tools\QuickCreate $create) {
    $create->text('name', 'Name');
    $create->email('email', 'Email');
});

Note:Each field in the form, and the same type of form field should be set on the create form page.

The form fields supported by the form have the following types

Text input

$create->text('column_name', 'placeholder...');

Email input box

$create->email('column_name', 'placeholder...');

IP input box

$create->ip('column_name', 'placeholder...');

URL input box

$create->url('column_name', 'placeholder...');

Password input box

$create->password('column_name', 'placeholder...');

Mobile number input

$create->mobile('column_name', 'placeholder...');

Integer input box

$create->integer('column_name', 'placeholder...');

Select

$create->select('column_name', 'placeholder...')->options([
    1 => 'foo',
    2 => 'bar',
]);

Multiple select

$create->multipleSelect('column_name', 'placeholder...')->options([
    1 => 'foo',
    2 => 'bar',
]);

Date time selection

Time and date input box

$create->datetime('column_name', 'placeholder...');

Time selection

Time input box

$create->time('column_name', 'placeholder...');

Date selection

$create->date('column_name', 'placeholder...');

Last updated