Page 1 of 1

Custom form fields

Posted: Fri Jul 24, 2009 7:52 am
by commie_hero
I'm making a very lightweight CMS for my personal use. I want to make a tab that lets me create forms that people on the front-end can fill out.

I suppose the question is how do you store a "form" in a database and retrieve all of its values later.

This is more or less a "custom form fields" implementation.

Re: Custom form fields

Posted: Fri Jul 24, 2009 9:27 am
by Bruno De Barros
In my opinion, a Form Generator class would do the trick. If you had a Form Generator, you'd be able to create forms with it at will, and then just serialize the object and store it in the database. This would be the easiest way, in my opinion.

Re: Custom form fields

Posted: Fri Jul 24, 2009 9:31 am
by alex.barylski
Store data in a generic value and a schema like:

Code: Select all

pkid, formid, name, value