⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠


profile picture

Read only input fields not working?


  • profile picture
  • Member

Posted 11 January 2021 - 07:26 AM

I'm trying to make an input field readonly in grocery crud enterprise;

$crud->fieldType('user_name', 'readonly');
$crud->fieldType('user_tel', 'readonly');
$crud->fieldType('start_date', 'readonly');

I've tried the above method but it just doesn't seem to work. It just lists the input field as normal, fully editable.

$crud->readOnlyFields(['user_name', 'user_tel', 'start_date']);

I've also tried using this method.. which kind of works? By the looks of it it certainly does make the fields read only. But for some reason the field values aren't being posted when I submit the form.


Am I missing something?