Re: Formulator nice-to-have features

Josef Meile <[email protected]> Fri, 24 Nov 2006 21:31:30 +0100
Newsgroups gmane.comp.web.zope.formulator.devel
Message-ID <[email protected]>
Josef Meile wrote:
>> After having worked with Formulator, I needed some features that it
>> doesn't have that perhaps would be nice to include in the official
>> release.
>>
>> 1) i18n_domain for each field: [...]
>>
>> 2) group property for each field: [...]
>>
>> 3) Dynamically setting properties while rendering a form. [...]
> I forgot another feature:
> 4) Introduce a render_label method in order to distinguish required
> fields in a rendered form. [...]
I found another one:

5) Support for the html "id" property of form elements: This is a
***must** if you want to access a form control through the javascript
function getElementById of the "document" object. I find it really
tedious when you use xml forms; you have always to do this:

<field><id>ResearchInterests</id> <type>LinesField</type>
<values>

[other tags come here...]

<extra>id="field_ResearchInterests"</extra>

[other tags come here...]
</field>

You already gave an "id", why do you have to give it again? I think
that if you have lots of fields, then the form isn't maintainable
anymore; you can easily forget to write an additional extra tag
somewhere. I know that the "value" and "id" attributes doesn't have to
be equal, but it is easier to code a javascript if they are.

Anyway, if the case is saving load time for an html website (the less id
attributes it has, the smaller the page will be), then why not to add a
new property to the xml structure called "use_html_id"?

Regards
Josef