⚠ 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

Show status on read mode



pbcomput
  • profile picture
  • Member

Posted 07 April 2014 - 12:58 PM

Hello,

 

I want to show the status name on read mode. For user status I took ENUM type with 'a' for Active and 'i' for Inactive.

 

Its working properly on Add and Edit, for that I did like below

$crud->field_type('ad_status','dropdown', array('i' => lang('inactive'), 'a' => lang('active')));

Its showing me Active and Inactive texts in dropdown when I go to add or edit.

 

But, In read mode it's showing me 'a' or 'i' but I want to show Active and Inactive text on read mode. Can any one help me to show the status in texts.

 

Thanks for your help.! :)


Amit Shah
  • profile picture
  • Member

Posted 08 April 2014 - 11:58 AM

Hi there,

 

You can do a callback_read_field like callback_edit_field .. (mind it - u need to ensure u working with latest GC copy)