Hi!
I am building a form generator/builder for Zend Framework. It is for a client, and because the client wants to build forms without going into code, I need a drag&drop interface. The user has to be able to drag&drop predefined Form elements into a container to create a form. This is the easy part, which I've almost solved myself. The harder part, and the question is about the saving of this form. I wish to save this form in a MySQL database. How would I approach this?
I was thinking of:
- Saving the elements into a database
- Saving the form into a databse, including the element id's
- extending the Zend_Form class, so that when a form is requested, it loads all of the elements and creates the needed php code, so that it can be rendered and also populated, if needed for editing.
Does anyone have a better suggestion, or is this the way to go?
Any opinion welcome!