Re: [web2py] need help with typeahead widget

2013-03-22 Thread Richard Vézina
With the SELECT, better initialisation and no more roundtrip to get the value representation : def autocomplete_typeahead_widget(field, value, referenced_table, represent_field, id_field, controller, **kwargs): table_name = field._tablename field_name = field.name field_requires = fiel

Re: [web2py] need help with typeahead widget

2013-03-20 Thread Richard Vézina
It could be less complicated if the hidden field were of select I guess since value and representation could be easier to get on form reload... I may refactor this when I get time... Richard On Wed, Mar 20, 2013 at 5:04 PM, Richard Vézina wrote: > Finally solve my problem like that... Not very

Re: [web2py] need help with typeahead widget

2013-03-20 Thread Richard Vézina
My understanding of the problem is that the test2_test1_id_ac input field is not part of the form and web2py don't keep the value on page refresh... But I can't figure out how other jquery plugin does ot keep value of added field... no... I am correcting myseld... I do understand, since they recrea

Re: [web2py] need help with typeahead widget

2013-03-20 Thread Richard Vézina
You right Richardo, I will do a dummy app... So less time impact on anyone who want to help! I read at your code and no sure where you were going by the little change you made to the code I provide... I get back in a couples of minutes with dummy app. Richard On Tue, Mar 19, 2013 at 9:59 PM,

Re: [web2py] need help with typeahead widget

2013-03-19 Thread Ricardo Pedroso
On Tue, Mar 19, 2013 at 11:15 PM, Richard wrote: > Hello, > > I wrote a typeahead autocomplete widget and work around many little issues, > but now I have one that I have no clue how to solve... > > You can find the code here : > https://groups.google.com/d/msg/web2py/Fs-tAH75fGY/6VtZ32x6lMAJ > >

[web2py] need help with typeahead widget

2013-03-19 Thread Richard
Hello, I wrote a typeahead autocomplete widget and work around many little issues, but now I have one that I have no clue how to solve... You can find the code here : https://groups.google.com/d/msg/web2py/Fs-tAH75fGY/6VtZ32x6lMAJ When the form get submit and the validators trigger the input v