callback_read_field
void callback_read_field( string $field , mixed $callback )
Quick Description: This callback escapes the default auto field output of the field name at the read form.
Available for version >= 1.6.0
Example:
function example_callback_read_field(){ $crud = new grocery_CRUD(); $crud->set_table('offices'); $crud->set_subject('Office'); $crud->required_fields('city'); $crud->columns('city','country','phone','addressLine1','postalCode'); $crud->callback_read_field('phone', function ($value, $primary_key) { return '+30 ' . $value; }); $output = $crud->render(); $this->_example_output($output); }
Note: The below example is an iframe so it might appeared with a scroll bar. If you like you can view the example
on a new tab