I need to add some custom fields in the view page and obviusly populate them with a callback function for the read mode. I have not found any reference to functions for adding fields in read page in grocery crud documentation; just a reference in a very old topic here mentioning the function set_read_fields that i cannot find after 5 years from that forum topic in the decumentation. Anyway, even if the function gives no errors, when the callback function is called i got a lot of errors; here the log
ERROR - 2020-07-22 17:26:28 --> Severity: Notice --> Undefined index: officies_location /home/phar263d/public_html/adminPanel/application/libraries/Grocery_CRUD.php 4477
This is the code i used
$this->grocery_crud->add_fields('id','vendor_name','vendor_web_site_url','default_currencies_id','affiliation_category','external_affiliation_services_id','affiliation_vendor_id','remark','last_modified','creation','enabled'); $this->grocery_crud->edit_fields('id','vendor_name','vendor_web_site_url','default_currencies_id','affiliation_category','external_affiliation_services_id','affiliation_vendor_id','remark','last_modified','creation','enabled'); $this->grocery_crud->set_read_fields('id','vendor_name','vendor_web_site_url','default_currencies_id','affiliation_cate...gory','external_affiliation_services_id','affiliation_vendor_id','remark','last_modified','creation','enabled','officies_location'); [...] $this->grocery_crud->callback_read_field('officies_location',array($this,'_callback_officies_location'));
The callback function is fine (tested); tracking the error i found out that it happens when the rendering function is called
$output = $this->grocery_crud->render();
Any ideas? Thanks.