guistebal ha scritto:
> I've just begun to play with TG2 and , up to know, I've succeded to
> make a nice form (using TableForm) to add data and it works.
>
> 1-Now I would like to be able to edit my data but I don't see (the
> probably obvious way... but not for me) how to fill the form with
> data... unfortunaly, the nice tutorial stops there.
>   

> 2-Is there a way to hide a field by passing an argument ? I don't want
> a HiddenField, but a field which, for example, would be hidden while
> adding data but not when editing it, so I can still use the same
> widgets list. The only thing I've found up to know is to disable it
> with child_args={'MyField': {'disabled': True}} but it does not hide
> it.
>
>   

All at once :-))



when you do the return dict( form = <form>, .... )

add your calculated value and your changed style attribute for hide:

 form_value = dict( value = dict( field1 = <value>,
                                  field2 = <value>,
                                )
                    attrs = dict( field1 = dict( style = 'display:none'))
                  )






i hope this can hlp u
Glauco

-- 
+------------------------------------------------------------+
 Glauco Uri  
 glauco(at)sferacarta.com 
                               
          Sfera Carta Software®       info(at)sferacarta.com
  Via Bazzanese,69  Casalecchio di Reno(BO) - Tel. 051591054
+------------------------------------------------------------+



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