callbackCloneField(string $fieldName, callable $callback)

Create a custom field with a callback for clone form. The main callback get as parameters:

  1. The value of the field from the database for that row
  2. The primary key value of the row in case you need to use it for an extra manual query


$crud->callbackCloneField('telephone_number', function ($fieldValue, $primaryKeyValue, $rowData) {
    return '+30 <input name="telephone_number" value="' . $fieldValue . '"  />';