Hi Greg,
I did a few in MySql and the challenge is to manage the validation and the
field dependencies, for example the State depends on Country, the group
Shipping Address depend by the flag "Same as billing address", so most of
your work will be on the frontend with jQuery.

I think your best way to go is to keep the configuration in JSON and to
save the data in MongoDB. The flow will be, read the configuration, draw
the form, auto-save draft onblur (so when the user go to the next field).

Here is an example of the configuration:
{ ["Billing Address":[
                             {"name": [{"type":"text"},
{"validate":"required,maxlen=50"}]},
                             {"note": [{"type":"textarea"},
{"validate":"required,maxlen=255"}]},
                             {"country": [{"type":"select"},
{"validate":"required,maxlen=255"}, {"dependency":"country"}]},
..
  ,"Shipping address":
]}

I've created a form generator (
http://www.rainframework.com/User-Guide/Library/Form/), but it only draws
and validate forms, so you'll need to figure how to manage the
dependencies, which you can do with some jQuery animation (show/hide) +
Bassistence plugin (
http://bassistance.de/2012/09/07/release-validation-plugin-1-10-0/, already
included in my Form class).
Hope this help.

Let us know if you create or find the definitive form solution!
Federico
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/show-participation

Reply via email to