On 20 Feb 2009, at 22:49, Kris Wallsmith wrote: > How are you questionnaires setup? If they're configured in the > database, you should be able to present and validate them using you > Doctrine forms and the something similar to what Gandalf has pasted > below... Or am I misunderstanding?
At the moment it's a horrible manual process... I'm trying to add some sanity to it by using a form builder. Yes, it would be set up in the database (and ONLY in the database - no code and no YAML [unless dynamically generated]). A user would first create a container (or "form") for the fields (say... "Bank Account Application"), then define each of the fields (and their characteristics) that the account applicaiton would have (eg "first name" would be an "input" type, min 2 chars, max 30 chars, a-z chars only, required). The "form" needn't be a questionnaire though, it could be a surveyors report, a bank account application, an invoice.... pretty much anything. There are really only 2 objects - the container and many "field" objects within the container. Instead of a form representing an objects member variables, it now represents a collection of objects - each form field being an independent object. From a users point of view, they could browse to say /forms/4 and see a questionnaire about their favourite food, or /forms/7 and see a self assessment tax form. However, both forms would probably share common fields such as first name, last name and gender. I'm not sure if you're misunderstanding or not... I certainly don't understand the example code, but it looks to me like it's got lots of hardcoded widgets, options and statuses in - which seems way different to what I've just described. Everything needs to be fully dynamic except for the allowed data types and the validators that can be applied to them. I'm following up with another email in a few minutes to clarify and respond to others comments... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
