You can create a widget function that creates the original widget and
returns it modified:
def mycustomwidget():
new_widget = SQLFORM.widgets.autocomplete(request,
db.category.name, limitby=(0,10), min_length=2)
... # modify the helper
return new_widget
db.mytable.myfield.widget = mycustomwidget
Other (better I think) way is to inherit the widget classes in a
custom class
class mycustomwidget(SQFFORM.widgets.widgetname):
# method overriding code
....
On 14 mar, 13:53, Manuele Pesenti <[email protected]> wrote:
> Hi,
> I have opened a ticket to propose an improvement of tha AutocompleteWidget
>
> http://code.google.com/p/web2py/issues/detail?id=716&thanks=716&ts=13...
> <http://code.google.com/p/web2py/issues/detail?id=716&thanks=716&ts=13...>
>
> What's the way to define it in my application without modifing the gluon
> code?
>
> Thanks a lot
>
> Manuele