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
recreate themself from the dom the get the value from the web2py input
field (test2_test1_id)...

I my case since the test2_test1_ac input is recreate I guess on form error
when the form is reload with error so the inputed value is overwrite...

So I need a piece of js that will set the a value "label" on form reload,
but I am afraid a circular reference thought

Richard


On Wed, Mar 20, 2013 at 3:04 PM, Richard Vézina <[email protected]
> wrote:

> Here the dummy app (see attach)
>
> To reproduce the behavior I want to correct : You need to submit the form
> without input value for f1 and a picked value with typeahead autocomplete
> widget...
>
> test2 table f1 and test1_id are required field... You will notice that if
> you fill field test1_id but not f1 error message triggers... Then you will
> see that the input value "label" of the inserted choice "a1" for instance
> it not displayed... But there is no error message because the hidden field
> value stays there has it should, but it pretty anoying for a user to don't
> see his input and not having a error message.
>
>
> NOTE: There is duplicated entries in the typeahead drop down don't no why
> it should be the bootstrap used, because here I don't get this kind of
> behavior... So must be a issue with the typeahead bootstrap lib form
> netdna.bootstrapcdn.com, I don't know...
>
> Richard
>
>
>
>
> On Wed, Mar 20, 2013 at 11:08 AM, Richard Vézina <
> [email protected]> wrote:
>
>> 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, Ricardo Pedroso <[email protected]>wrote:
>>
>>> On Tue, Mar 19, 2013 at 11:15 PM, Richard <[email protected]>
>>> 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
>>> >
>>> > When the form get submit and the validators trigger the input value
>>> key or
>>> > value label is cleared out, but the value of the hidden field stick so
>>> there
>>> > is no problem get the proper value in the database but it is kind of
>>> anoying
>>> > to the user to not see his value and didn't have validator error
>>> message.
>>>
>>> Hi Richard,
>>>
>>> You probably would have more and accurate answers if you made
>>> a simple application with the problem.
>>>
>>> Based on the code you post and the comments I tried to replicate the
>>> problem
>>> you describe.
>>>
>>> Find attached a small and self contained application,
>>> with your widget (with some little changes), and see if it's what you
>>> want.
>>> If not, make a small, self contained application for us to try.
>>>
>>> To run it just drop in an someapp/controllers.
>>>
>>> Regards,
>>> Ricardo
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to