[eluser]Moobies[/eluser]
i started out with CI just 3 days ago so bear with me
i would just like to be able to go to /objects/edit/5 and have a form load that has its fields set with the values of the record in the database.
i already created the /objects/create form which if you submit with errors, returns and is prepopulated. for that i used (as the docs suggest)
Code:
value="<?php echo set_value('fieldname') ?>"
so then i moved onto the edit side of things. to my mind, you would bind the values from the database record to the input fields in the controller. the reason for that is that all the $this->form_validation setup is done in the controller, so why not also be able to bind the record values to the view's input fields in the controller to.
i found that i could not do this using any current mechanism (am i wrong?). i tried set_value (since as you say it seems to suggest that i can set the field value for the view) but it does not. the form is not yet submitted at this point, but i kind of need it to behave like it has been. this is why put_value (my "proposed" function) works, and it does not as far as i can see after testing all possibilities of submitting the forms, break or mess up anything. it's called postdata but really it's just a field to value array binding map - which is why i used it.
i don't as a matter of personal taste like the fact that in my create and edit view form code (which is shared) that i have to specify the default value there and i guess that is all i am saying - is there a built-in way to specify the default value of a field for an edit form in the controller.
it's not even a question, i already solved it with the put_value and it works great and keeps the view input fields tidy, so the discussion is now just a theoretical one. my view is that both ways are valid, but only your preferred way is supported which is why i added this small binding function to support my preference.
does that explain?

)