fieldTypeEditForm
fieldTypeEditForm(string $fieldName, string|ModelFieldType $fieldType)
This function is used for cases that you need to change the field type but only for the edit/update form. You can choose any field type from the list of field types.
Any of the of the below 2 examples have the exact same results:
$crud->fieldTypeEditForm('birth_date_year', GroceryCrud::FIELD_TYPE_NUMERIC);
or:
$crud->fieldTypeEditForm('birth_date_year', 'numeric');
You can also use the ModelFieldType object as an input. For example:
<?php
// ModelFieldType is only available on Grocery CRUD Enterprise
// Add the below code at the beginning of the file
use GroceryCrud\Core\Model\ModelFieldType;
...
// At your code
$myField = new ModelFieldType();
$myField->setDataType(GroceryCrud::FIELD_TYPE_NUMERIC);
$myField->setIsNullable(true);
$crud->fieldTypeEditForm('birth_date_year', $myField);