It is incredibly common to create a “New” or “Edit” form in CodeIgniter (or any framework for that matter).
Without resorting to automated scaffolding, what is the quickest / easiest way to create these forms in CodeIgniter with the least amount of typing/fuss/etc.
The ideal solution should handle many elements, validate itself before submitting, should not clear the form if a mistake is made, and still be readable by the developer. It would not rely on a “generator” script.
I wrote a set of code which currently lives in MY_Controller which uses the $config that you write for form validation to generate a form.
Along the way it creates the form, adds * to the labels etc
I’ll dig it out and post it on Monday.
I’d prefer it to be a library but my knowledge of CI is still growing…
ADDED MY MY_controller.php details:
I have the following in my MY_Controller.php file