[Zope3-dev] Re: Schemas, Fields and Fieldsets

Steve Alexander steve@cat-box.net
Fri, 28 Mar 2003 12:00:55 +0200


Jim Fulton wrote:
> Marcus J. Ertl wrote:
> 
>> Hi!
>>
>> Is it possible to group fields in schematas in a logic way, grouping
>> them for example?
>>
>> Such a group could be rendered in a form as fieldset... 
> 
> 
> I don't know what this means. What do you mean by "grouping"?
> What is a "fieldset"?

I believe he means that if you have an interface with these fields:

   foo            TextLine

   bar            TextLine

   name           TextLine

   emailaddress   TextLine

   baz            TextLine

   phonenumber    TextLine

You might want to present them like this:
(ascii art web page follows)


    +---------------------------------+

     Personal details

     name  [                ]
     email [                ]
     phone [                ]

    +---------------------------------+

    +---------------------------------+

     Metasyntactic variables

     foo [        ]
     bar [        ]
     baz [        ]

    +---------------------------------+

    Press 'submit' when you have completed the form.

    +---------------------------------+
       [ Submit ]    [ Cancel ]
    +---------------------------------+


I had this kind of requirement for my big Zope 3 project, so I've 
implemented a variant on the "edit form" class that is in Zope 3, which 
handles this kind of presentation.

I was talking with Marius over lunch the other day, and we found that in 
both our Zope 3 projects, we have many requirements for automatically 
generated and validated forms that are not handled by the current Zope 3 
implementations.

Our own implementations are somewhat crufty -- the emphasis being on 
getting the job done, rather than making something suitable for general 
use as part of a form/widget framework.

So, we agreed to spend some time writing down all of our requirements 
for autogenerated forms, based on our recent experience and projected 
furutre requirements. When we've got our set of requirements, we can 
implement something that will meet these needs and offer it for 
inclusion in Zope 3.

--
Steve Alexander