⚠ 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

view field but not edit



LoganCMV
  • profile picture
  • Member

Posted 20 May 2015 - 20:21 PM

hi, editing a record i need view a field but can not be edited.

 

example:    ID, NAME

 

in the form EDIT show the 2 fields and only NAME is enabled for edit.

 

 

i treat with :

 

$crud->fields('ID');

$crud->unset_edit_fields('ID');
$crud->unset_texteditor('ID');
$crud->unset_fields('ID'); 

 

i tried separately and combinaded, and always the field ID show "editable".

 

 

Best regards

P.L. 

 

 


Amit Shah
  • profile picture
  • Member

Posted 22 May 2015 - 02:25 AM

use field_type

http://www.grocerycrud.com/documentation/options_functions/field_type

 

set it to readonly...


LoganCMV
  • profile picture
  • Member

Posted 25 May 2015 - 13:11 PM

oohhh...that...!!!!

 

thanks.

 

 

\m/

P.L.