fieldTypeCloneForm

fieldTypeCloneForm(string $fieldName, string|ModelFieldType $fieldType)

This function is used for cases that you need to change the field type but only for the Clone form. You can choose any field type from the list of field types.

Both 3 below examples will have the exact same results:

$crud->fieldTypeCloneForm('date_birth_year', 'numeric');

or:

$crud->fieldTypeCloneForm('date_birth_year', GroceryCrud::FIELD_TYPE_NUMERIC);

or:


// At the beginning of the file
use GroceryCrud\Core\Model\ModelFieldType;
...
$myField = new ModelFieldType();
$myField->setDataType(GroceryCrud::FIELD_TYPE_NUMERIC);
$crud->fieldTypeCloneForm('date_birth_year', $myField);