sorry If I did re-post this post.


Hello, I'd like to use widgets to make a form. And to make things
easier for the end-user, I'd like to fill the fields which can be
guessed. But how can I do this ?

Imagine you have such widget:

class ObsAddPeopleFields(widgets.WidgetsList):
   lastname = widgets.TextField(label="lastname"
                               ,validator=validators.NotEmpty)
   firstname= widgets.TextField(label="firstname(s)"
                               ,validator=validators.NotEmpty)

let's make a table form with it:

add_people_form = widgets.TableForm(fields=ObsAddPeopleFields()
                                  ,submit_text="save person")

and in the controllers.

I'd like to do something like
add_people_form['lastname'].default='the lastname that we have guessed'

so how can I do to touch the:
- default : so I can put a text in the textfield
- attrs   : that I can change for e.g. the size



thanks in advance for your help

Ced.
P.-S. does someone has a good reference for such things.


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