⚠ 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

Dropdown list in read view



Racing Chocobo
  • profile picture
  • Member

Posted 13 November 2013 - 15:25 PM

Hi all, I just update to the latest version of grocery crud and find there were some new things and function of it, and one of them is there is a read view button additionally.

However, I met some problem here, while I set a field into a dropdown list, something like this

$stage = array('Buy', 'Confirm', 'Send', 'Delete');
$crud->field_type('stage', 'dropdown', $stage);

the dropdown list only work in add and edit view, but not works inside the read view (it still show the origin value)

 

I realize it only works if I used the set_relation to generate the dropdown list, but it need an additional table for it, which is redundant in this case.

 

So any solution to solve this problem?

Thank you very much!