Populating a form with data from the Model / database |
[eluser]juddmuir[/eluser]
It seems set_value() only works when validating a form - how is it possible to populate a form with data obtained from the model/database? This is what I'm using in pseudo-code: Controller: $classified = $data['listings'][0]; //an array containing the db record data $this->load->view('classifieds/classifieds_form_view', $data); View: form_input('classified_title', set_value('classified_title')); The form, when called after a form validation, works fine - but when I tried to use the same form to populate with data, no joy :-(
[eluser]majidmx[/eluser]
check this out and let us know if it could help you : http://ellislab.com/forums/viewthread/100027/ |
Welcome Guest, Not a member yet? Register Sign In |