ArtiGrid
v1.7

Bulk Edit Form

This example demonstrates how the bulk edit feature works in ArtiGrid. By selecting multiple rows using the checkboxes, you can update several records at once using a single form.

When the bulk edit action is triggered, a form is displayed allowing you to modify specific fields. Only the fields you fill in will be updated across all selected records, while empty fields will be ignored to prevent unintended data overwrites.

The formFields() method is used to control which fields are displayed in the form. In this example, only productName and productLine are editable, making the interface cleaner and more focused.

This approach ensures a safe and efficient way to perform mass updates without affecting other data.


<?php
    
    $grid = new ArtiGrid();
    $grid->table('products')
        ->template('bootstrap5')
        ->formFields(['productName', 'productLine'])
        ->modal();
    echo $grid->render();
?>
id productCode productName productLine productScale productVendor productDescription quantityInStock buyPrice MSRP Actions