Jorge Godoy wrote:

>asm <[EMAIL PROTECTED]> writes:
>
>  
>
>>>Yes, I understand that part, and that is what my ReadOnlyTextField
>>>does: the template on it eliminates the 'input' and just displays
>>>the value.
>>>      
>>>
>>Apologies for my frustrating reply then!
>>    
>>
>
>  
>
>If it is a "ReadOnlyTextField" why can't it be a label?
>  
>
or add attrs=dict(disabled=True) to it,
if you want the field has a layout like a normal field (but disabled).
 

I have instead another concern. What about having a ReadOnlyTextFiled 
widget that is passed by the form?
To avoid twice definition of the same field as in:

class EditFields(widgets.WidgetsList):
    codice_ro = widgets.TextField(name='codice', attrs=dict(disabled=True)),
    codice      = widgets.HiddenField(name='codice')


>  
>
>>>What I want to know is, how do I prevent the 'name: None' pairs from
>>>ending up in the keyword set sent to my action controller method?
>>>      
>>>
>
>Label's aren't submitted, so you won't get them on your controller when
>the form is submitted.
>
>  
>
>>The Turbogears widgets framework will eventually be deprecated in
>>favour of a framework called ToscaWidgets that is currently being
>>developed.  ToscaWidgets might be able to do as you need or the
>>authors might add in useful features to help you.
>>    
>>
>
>I don't believe that it would matter since it is the HTTP protocol: if
>there's a field in a form and the form is submitted, the value of the
>field is sent.  As for validators, then they are applied on the received
>values, as determinated by the developer.
>
>  
>
>>As a work around you could have a for loop to transfer all 'not None'
>>form values to your data record.  Inelegant but probably sufficient.
>>    
>>
>
>Or del None values from your **kwargs...  
>
>
>  
>


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

Reply via email to