⚠ 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 view displays dropdown fields as index number and password fields as string



fa3d
  • profile picture
  • Member

Posted 22 October 2016 - 20:03 PM

Hello, 

 

When I set a field type using $crud->field_type() method, like this:

$crud->field_type('field_name','dropdown',
                   array('0' => '(unknown)',
                         '1' => 'Option One', 
                         '2' => 'Option Two'
                         )
                 );

The field is displayed correctly in the main view, and also in edit view (the dropdown is displayed). But in READ view, the field value is displayed as the index number (0,1,2..) and not the string associated with it (Option One, etc.) 

 

Also, if I set a field type as 'password', in the main grid view it is displayed as ****** but in read view it displays the field value as string. 

 

Am I doing something wrong? or is this a very big and important bug??

 

Thanks.