On Jun 29, 2006, at 6:06 AM, Randall wrote:

>
> How do I pass a default value for an autocompletefield to a form?  I'm
> not talking about the orignal default value of the widget, but rather
> setting the value after the form is created.
>
> With other widgets, this works:
>
> def someMethod(self):
>     df_values['mywidget'] = my_df_value
>     return dict(form=form, value=df_values)
>
> # In the template.
> ${form(value=df_values)}

The AutoCompleteField is a CompoundWidget so you should pass a dict  
to it as value:

df_values['mywidget'] = dict(text="foo", hidden="bar")

HTH,

Alberto

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