⚠ 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

Search/Filter Dropdown



Ron van den Bergh

Ron van den Bergh
  • profile picture
  • Member

Posted 17 May 2015 - 17:58 PM

Question,

 

I have a dropdown:

 

0 = Rejected

1 = New

2 = Confirmed

 

on the view I want to filter on that field.

 

Is there a way to filter on the word in stead of the value?

 

+

 

bug? :   When  filter on number, 1 and 2 are working, but when  filter  for 0 all records are shown...

 

Thanks


Paul Savostin

Paul Savostin
  • profile picture
  • Member

Posted 02 June 2015 - 11:31 AM

Hi. What type of this field?   Simple approach - field name "status" ENUM ('rejected','new','confirmed')

 

and in controller you have

just $crud->field_type('status','enum',array('rejected' => 'your name of this status if need', 'new' => ... so on)

hope it helps:)