Hi all,
I have a boolean fiel "root_version", a tinyint in the DB, the value of which is shown correclty in the list table, as well as it is shown correctly in the edit mode, but surprising it is not shown in the view mode. In the view mode it is correctly shown the label "Root Version:", but after the ":" the value space is empty.
The view mode shows the default fields (all but the primary key), while the other modes have customized field list as following defined
$this->grocery_crud->set_table('survey_models'); // TABLE, NEW, EDIT FIELDS $this->grocery_crud->columns('id','name','type', 'root_version','state','version_number','root_version_id','min_enabling_answers','survey_modification_grant_category', 'max_survey_score', 'max_exclusion_count', 'global_survey_duration_days', 'user_answer_duration_days', 'not_completed_sections_progress', 'creation', 'languages_id'); $this->grocery_crud->add_fields('name','type','state', 'min_enabling_answers', 'ref_db', 'ref_table_name', 'ref_table_primary_key_column_name', 'ref_table_reference_name_column', 'survey_modification_grant_category', 'user_db', 'user_table_name', 'user_table_primary_key_column_name', 'user_table_user_category_column_name', 'user_session_var_name', 'user_categories_list_db', 'user_categories_list_db', 'user_categories_list_table_name', 'user_categories_list_table_primary_key_name', 'list_of_allowed_user_category_ids', 'max_survey_score', 'max_exclusion_count', 'global_survey_duration_days', 'user_answer_duration_days', 'not_completed_sections_progress', 'languages_id'); $this->grocery_crud->edit_fields('name','type','state', 'root_version', 'min_enabling_answers', 'ref_db', 'ref_table_name', 'ref_table_primary_key_column_name', 'ref_table_reference_name_column', 'survey_modification_grant_category', 'user_db', 'user_table_name', 'user_table_primary_key_column_name', 'user_table_user_category_column_name', 'user_session_var_name', 'user_categories_list_db', 'user_categories_list_db', 'user_categories_list_table_name', 'user_categories_list_table_primary_key_name', 'list_of_allowed_user_category_ids', 'max_survey_score', 'max_exclusion_count', 'global_survey_duration_days', 'user_answer_duration_days', 'not_completed_sections_progress', 'languages_id'); // BOOLEANS LABELS $this->grocery_crud->field_type('root_version','true_false', array('1' => 'yes', '0' => 'no'));
The last field_type function does not change the situation, even if skipped the result dow not change. Any ideas? thanks. Federico.