I need to update a record, but I want to display some fields as disabled for editing. I don't want to let the user edit a certain field, but I want to display them
Asked
Active
Viewed 1,947 times
1 Answers
8
If I understand your problem correctly then you may want to try something like this.
CRUD::addField([
'name' => 'nameOfYourField',
'label' => 'nameOFLabel',
'type' => 'number',
'attributes' => [
'readonly' => 'readonly',
],
]);
You can also use 'disabled' => 'disabled', but it depends what you want exatly to achieve with the values. Check it out here

B A
- 106
- 4