[eluser]Militis[/eluser]
Ah, alright thanks. I'll go through and fix this tomorrow.
How would you suggest I differentiate between just loading the form and the form having been submitted, but has errors? I've tried something like:
Code:
if ($this->input->post('submit')) { //submit being the name of the button
//run validation, and do the CRUD dance if it passes
} else {
//load the view with the form
}
but I wasn't sure if that's how you do it or not. That would be how I'd have done it before CI, replacing $this->input->post with $_POST of course. I'll need to do this for the edit aspect of this app, since it needs to populate the fields for editing.
Reducing this to only one function per form would also reduce some of the bloat of my fat controller...(I think that's the term used for it being over 500 lines, respective of the complexity of the app, long anyway... My model is pretty close to the same, but that I would expect...and it's easy to split if need be.)
I'm rather taken with how easy it is to separate things now. Having to change something is so easy I weep at past hours/days/weeks of search and replace.