After select all i need in select "Dish" and typing data to Count, I click on "Save" and Grocery Crud returns message "The order_items field is required", but I want to insert a string like "Dish <dish_name> Count 5 Price 50" into database.
Is it possible?
Sorry for my english.
... $crud ... ->callback_field('order_items',array($this,'items')) ->required_fields('order_items'); ... function items($pk,$row) { $dishes = $this->db->get('catalog__dishes')->result(); $str = ''; foreach ($dishes as $line) if ($line->dish_active != 0) $str .= '<option value="' . $line->dish_id .'"' . '>' . $line->dish_name . '</option>'; return '<table id="items_table">' . '<tr>' . 'Dish <select class="item_select" id="row_1_items">' .$str .'</select>' . 'Count <input class="item_select" id="row_1_count" type="text" onkeypress="return event.charCode >= 48 && event.charCode <= 57" style="width:150px">' . 'Price <input class="item_select" id="row_1_price" type="text" style="width:150px" disabled>' . '</tr>' . '</table>'; }