Thanks Pablo,

I'll take a closer look at your code tomorrow - now that you've  
explained it, I can understand what it's doing :)

On 21 Feb 2009, at 14:24, Gandalf wrote:

>
> Hello Lee,
>
> What you ask is very easy to do.
>
> The widgets in my code are fixed because im solving a particular
> problem, I have  series of questions, that the user may answer or no,
> the answer can be yes/no/im not sure, if  he answers no/im not sure, I
> show him an explanation box tied to the answer.
>
> I have all the provisions (possible questions) and a procurement
> (formed by some answers).
>
> See an example on my test server: The code I sent you is part of the  
> third step.
>
> httop://oficoda.com
>
> use a random ID
>
> Another dynamically generated form:
>
> http://demo1.spihone.com/index.php?xmlFile=samples%2Fbeneteau323.xml
>
> as you can see I pass an xml file and I created a form to edit the
> elements on the fly.
>
> I coded for a client a wuufo clone, that does exactly what you ask,
> but im not in liberty to show that. But I tell you this, is very easy
> to do thanks to the form framework.
>
> I plan to write a plugin using this ideas, when I have time...
>
> Best,
>
> Pablo
>
> On 2/21/09, Lee Bolding <[email protected]> wrote:
>>
>> 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...
>>
>>>
>>
>
> >

"There are only 2 things in the world that give us absolute total  
happiness. One is, unwrapping a newly bought CD. And the other is,  
seeing other people fail." -- Armando Iannucci

Lee Bolding
[email protected]




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to