As far as I understand the way TG works, I do the following:

class TransFields(widgets.WidgetsList):
    id = widgets.HiddenField( default='-1')
    articles = widgets.SingleSelectField(label='Articles',

options=get_options)
    autoCompField =
widgets.AutoCompleteField(name='source',result_name="matches",

search_controller="/transactions/search_article_name",
                                        search_param="input",
only_suggest=True)
    quantity = widgets.TextField(label='Quantity', default =
'0',validator=validators.Int(not_empty=True))
    timestamp = widgets.CalendarDateTimePicker(label='Date',
format='%Y-%m-%d %H:%M:%S',
  picker_shows_time = True,attrs=dict(disabled=None))

---------------------
After that I make transaction_form =
widgets.TableForm(fields=localwidgets.TransFields())

This transaction_form is passed as form in both add and edit function,
but when I do editing I pass and one dictionary more named 'data' for
example, in which the keys are the same as the members of the
TransField class, and the values are what you want them to be.. Last in
the template you just do ${form.display(value=data)}

I hope this helps...


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