set_field_upload
void set_field_upload( string $field_name, string $upload_path)
Quick Description: Sets a field name to be an uploaded file.
Sets a field name to be an uploaded file.
Note: You cannot insert the slash (/) at the beginning of your string. For example if your path is assets/uploads/files from the beggining of your project you cannot insert "/assets/uploads/files", because it will not work.
Example:
function employees_management() { $crud = new grocery_CRUD(); $crud->set_theme('datatables'); $crud->set_table('employees'); $crud->set_relation('officeCode','offices','city'); $crud->display_as('officeCode','Office City'); $crud->set_subject('Employee'); $crud->required_fields('lastName'); $crud->set_field_upload('file_url','assets/uploads/files'); $output = $crud->render(); $this->_example_output($output); }