...
Notice, though, that if that fixes the validation, you've still got the
problem that the user has selected a last name that's no longer in the
database. If you can confirm that this is indeed the bug, you might want to
leave the code as-is, since the validation failure is correct
Thanks for all the help again. It should have been obvious to me
before but I am sure the problem is that values coming back from
get_last_names() are different when the form is generated compared to
when it is validated. So I really need to just get the list of last
names once and it use it both
An ajax autocomplete field would be a better option IMO.
There is an experimental AutocompleteWidget in web2py but I believe it
still has some issues plus it might not allow enough customization of
the query depending on your particular needs in this case.
You can create your own widget though.
On Mar 3, 2010, at 11:29 AM, hschill...@nasa.gov wrote:
Thanks for all the help again. It should have been obvious to me
before but I am sure the problem is that values coming back from
get_last_names() are different when the form is generated compared to
when it is validated. So I really
Your setup seems to work for me.
value not allowed would happen if you don't select a last name from
the drop box.
Are the values in the drop box OK?
What is in last_names?
Which web2py version?
Denes.
On Mar 2, 1:46 pm, hschill...@nasa.gov hschill...@grc.nasa.gov
wrote:
I have a form with a
On Mar 2, 3:49 pm, DenesL denes1...@yahoo.ca wrote:
Your setup seems to work for me.
Thanks for trying it.
value not allowed would happen if you don't select a last name from
the drop box.
I definitely do.
Are the values in the drop box OK?
Yes, they look OK.
What is in last_names?
I do not see any error in the code I propose you print the output of
last_names = get_last_names( )
to make sure the second time the function is called (when validation
is done), the output is the same as the first time (when the dropbox
is generated).
On Mar 2, 12:46 pm, hschill...@nasa.gov
I am testing with the same version (1.75.4) but I can not reproduce
the problem.
Are you using sqllite?
Have you done any migrations or changes that would do one?
If yes, try recreating the table.
Or it might be something that is not shown in the trimmed down
example.
On Mar 2, 3:58 pm,
It could also be a problem if get_last_names( ) is caching in ram and
there is more than one process running.
On Mar 2, 3:52 pm, DenesL denes1...@yahoo.ca wrote:
On Mar 2, 4:32 pm, Jonathan Lundell jlund...@pobox.com wrote: On Mar 2,
2010, at 10:46 AM, hschill...@nasa.gov wrote:
I have a
Thanks for all the thoughts on this. I will do some more debugging on
this tomorrow.
I am new to web2py. Is there a way to have the validator code give me
a better indication of what value it got and what it expected? ( Aside
from adding code to web2py itself, of course! )
--
You received this
not really. you can log/print request.vars.last_name and see what is
there. The issue to me is what is in last_names.
On Mar 2, 4:02 pm, hschill...@nasa.gov hschill...@grc.nasa.gov
wrote:
Thanks for all the thoughts on this. I will do some more debugging on
this tomorrow.
I am new to web2py.
11 matches
Mail list logo