The correct is here
widgets/forms.py
class Label(FormField):
"A simple label for a form field."
template = """
<label xmlns:py=" http://purl.org/kid/ns# "
id="${field_id}"
for=""> class="${field_class}"
py:content="value"
/>
"""
params = ["attrs"]
params_doc = {'attrs' : 'Dictionary containing extra (X)HTML attributes for'
'the label tag'}
attrs = {}
On 11/3/06,
mario henrique <[EMAIL PROTECTED]> wrote:
thanks a lot Chris,
but this doesn't work in class widgets.Labe().
I've read forms.py source and it seems that the class widgets.Label() doesn't has this property in TG.
I think that a solution would be to patch widgets/forms.py .
widgets/forms.py
class Label(FormField):
"A simple label for a form field."
template = """
<label xmlns:py=" http://purl.org/kid/ns# "
id="{$field_id}"
for=""> class="${field_class}"
py:content="value"
/>
"""
params = ["attrs"]
params_doc = {'attrs' : 'Dictionary containing extra (X)HTML attributes for'
'the label tag'}
attrs = {}
thanks
mario h.c.t.On 11/3/06, percious <[EMAIL PROTECTED]> wrote:
Yes,
You can create a dictionary and feed it into the "attr" clause of the
widget definition:
attr = dict(label='mylabel')
MyWidget(... attr=attr)
-chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---
- [TurboGears] widgets.Label() id property mario henrique
- [TurboGears] Re: widgets.Label() id property percious
- [TurboGears] Re: widgets.Label() id property Christopher Arndt
- [TurboGears] Re: widgets.Label() id property mario henrique
- [TurboGears] Re: widgets.Label() id propert... mario henrique
- [TurboGears] Re: widgets.Label() id propert... Christopher Arndt
- [TurboGears] Re: widgets.Label() id property Jorge Godoy
- [TurboGears] Re: widgets.Label() id property Jorge Godoy

