Jose Soares <[EMAIL PROTECTED]> writes:

> Hi all,
>
> I'm trying to disable a RadioButtonList widget.
> I tried using attrs also list_attrs but it doesn't disable the widget.
>
> What's wrong?
>
>
>
>                     widgets.RadioButtonList("pagamento", options=[(1, 
> "solo ultima"),
>                                                                   (2, 
> "tutte")],
>                                                                    
> label='cancella:',
>                                                                    
> list_attrs={'disabled':True}

Please, post code that has no syntax errors when you want people to check your
code. 


>>> from turbogears import widgets
>>> rl = widgets.RadioButtonList("pagamento", options=[(1, 
... "solo ultima"),
...                                                                   (2, 
... "tutte")],
...                                                                    
... label='cancella:',
...                                                                    
... list_attrs={'disabled':True})
>>> 
>>> rl.render()
'<UL DISABLED CLASS="radiobuttonlist" ID="pagamento">\n        <LI>\n           
 <INPUT TYPE="radio" NAME="pagamento" VALUE="1" ID="pagamento_1">\n            
<LABEL FOR="pagamento_1">solo ultima</LABEL>\n        </LI><LI>\n            
<INPUT TYPE="radio" NAME="pagamento" VALUE="2" ID="pagamento_2">\n            
<LABEL FOR="pagamento_2">tutte</LABEL>\n        </LI>\n    </UL>'
>>> 


As you can see, the HTML generated by your code is not what you're looking
for. 

Take a look at the documentation or the widgets code for the correct parameter
to pass (I believe it is 'attrs' as in other widgets).  I'm in a hurry here or
else I'd check it.


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

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

Reply via email to