Hi Marco,

Your example is very interesting but in my case it doesn't work, because 
I don't want to add some items, I want to replace some items instead.

Take a look at field 'codice', in EditFields it is a HiddenField while 
in AddFields it is a TextField
....

class EditFields(widgets.WidgetsList):
    codice          = widgets.HiddenField(name='codice')
    ...

class AddFields(EditFields):
    codice          = widgets.TextField(name='codice')

jo



Marco Mariani ha scritto:
> Jose Soares wrote:
>   
>> Hi,
>>
>> I have defined two forms; one to add a new record and another to update 
>> data.
>>   
>>     
> I don't see form definitions in your code, there are field lists.
>
> I suppose somewhere in the form creation you call
>
> fields=EditFields()
>
> fields=AddFields()
>
>
> Replace the latter with fields=EditFields()+AddFields()   (WidgetsList
> are lists, not compound widgets or anything magic)
>
> and replace AddFields(EditFields) with AddFields(widgets.WidgetsList)
>
>
> This should be a FAQ...
>   


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