Well, it looks like I have to do a bit of a U-Turn on the form generator. I was having problems getting the validation and display to work easily using a procedural style. I was having to write alot of unneccessary code. So I am now opting to go with a more object oriented route for implementing different form elements.
I also think I am going to borrow a concept from pear that I will use to handle multiple input form elements. My plan now is to have two ‘base classes’. One that can be extended to handle form elements. Then another that can be extended to handle form elements with more than one input. The base classes will contain all of the necessary protected functions to perform data validation and basic display (ie. labels, and what not). At that point I can then make a base set of elements to start out with. I don’t think I will have to touch the actual Form Generator class, but we’ll see.
Continue reading More Form Generator