On 12/19/05, Michele Cella <[EMAIL PROTECTED]> wrote:
>
> Jared Kuolt wrote:
> > Where do you draw the line when supporting attributes? We could
> > support all given attributes for each element, but I think that lends
> > itself to being an incredible headache.
>
> Hi Jared,
>
> Today I was thinking exactly about this issue.
> Here is my proposal, for example take the SelectField widget and look
> at this page:
>
> http://www.w3schools.com/tags/tag_select.asp

Always my first choice when looking up HTML spec.

> IMHO we should draw this line between Required/Optional attributes and
> Standard attributes.

That's one way to look at it. However, another way is to say that we
should only support attributes that are in all field widgets, i.e.
name and value. I'm not sure I like either decision.

> Standard attributes should be passed (if needed) with the attribute
> dictionary while for required/optional attributes we should provide
> direct support.
>
> For example (again for the SelectField):
>
> my_select_field = SelectField(name="test", multiple=True, options_dict)
>
> in my template:
>
> my_select_field.insert(size=30, attrs={'class':'test_field'})
>
> For a form:
>
> http://www.w3schools.com/tags/tag_form.asp
>
> then:
>
> my_form = TableForm([widgets], action="save", method="post",
> accept-charset=..., enctype=...)
>
> Hope I've been able to express my idea. :-)

It all makes sense to me.

> Ciao
> Michele
>
>


--
[EMAIL PROTECTED]

Reply via email to