cloneFields

cloneFields(array $cloneFields)

The fields that will be visible to the end user for Clone form. For example:

$crud->cloneFields(['first_name', 'last_name', 'fullname', 'address'])

You can see a full working example below:

$crud->setTable('customers');
$crud->setSubject('Customer', 'Customers');

$crud->setClone();
$crud->cloneFields(['customerName','phone','addressLine1','creditLimit']);

$output = $crud->render();

You can see the result of the above code below.The main difference that you will notice is that when you will press the "Clone customer" button at any row. The fields are less when you clone one (these are the fields that was specified at the cloneFields functions). You can simply compare the differences by also trying to press the "Add customer" button and see all the existing fields.