ArtiGrid
v1.7

Clone Row

The clone action allows you to quickly duplicate an existing record. When triggered, ArtiGrid loads the selected row data into a new form, excluding the primary key, so a new record can be created based on the original one.

This is especially useful when working with repetitive data, as it avoids the need to manually re-enter similar information. The cloned form behaves like a insert form, meaning that submitting it will insert a new record instead of updating the existing one.

You can enable or disable this feature using: unset('clone', true)


<?php
    
    $grid = new ArtiGrid();
    $grid->table('products')
        ->template('bootstrap5')
        ->required(false)
        ->actionsPosition('left')
        ->unset('clone', true)
        ->validation_required('productCode')
        ->perPage(10)
        ->modal();
    echo $grid->render();
?>
id productCode productName productLine productScale productVendor productDescription quantityInStock buyPrice MSRP Actions