readOnlyAddFields
readOnlyAddFields(array $fields)
There are cases, that we need some fields to be read only but only to the add form modal. In that case we can use the "Read Only Add Fields" method like this:
$crud->readOnlyAddFields(['category_id', 'parent_id']);
In the above case the category_id
and the parent_id
will be shown but the user will not be able to change the default value.