[web2py] Re: Multiple form flash problem.

2011-03-09 Thread annet
Hi David, Sorry if anything here is impractical, but here's a couple of thoughts... I very much appreciate you sharing your thoughts with me, they are helpful and they add to range of possible solutions to implement things. The reason I implemented things the way I did is that I am building

[web2py] Re: Multiple form flash problem.

2011-03-09 Thread villas
Glad to help and sounds like an interesting project. I am building this web application for a psychologist and he insisted on implementing it this way for cognitive ergonomic reasons. Hmm, I thought 'cognitive ergonomic reasons' was just an excuse for lying on the couch! :-) D

[web2py] Re: Multiple form flash problem.

2011-03-06 Thread annet
@Jonathan, Thanks for the link, indeed the first reply is very useful. @David, Thanks for posting your idea. It wasn't obvious to me why you needed two forms. Why not use one and test to see what has been filled in? Because I could not figure out how to test what has been filled in. I am

[web2py] Re: Multiple form flash problem.

2011-03-06 Thread villas
Sorry if anything here is impractical, but here's a couple of thoughts... If you wish to limit the user to make one search only... * Make an input box to enter the search value, and a drop-down box to specify the search type. * If using several input boxes, you could use JS. When user starts

[web2py] Re: Multiple form flash problem.

2011-03-05 Thread annet
Denes and Jonathan, Thank you both for your replies, now I do understand the logic of the function. @Denes, So, in Python you can only simulate a CASE statement using if's? Could you provide me with an example? Kind regards, Annet

Re: [web2py] Re: Multiple form flash problem.

2011-03-05 Thread Jonathan Lundell
On Mar 5, 2011, at 8:44 AM, annet wrote: So, in Python you can only simulate a CASE statement using if's? Could you provide me with an example? The first reply here is useful:

[web2py] Re: Multiple form flash problem.

2011-03-05 Thread villas
Hi Annet, It wasn't obvious to me why you needed two forms. Why not use one and test to see what has been filled in? Just another idea. Regards, David On Mar 5, 4:44 pm, annet annet.verm...@gmail.com wrote: Denes and Jonathan, Thank you both for your replies, now I do understand the logic of

[web2py] Re: Multiple form flash problem.

2011-03-02 Thread annet
Hi Denes, Thanks for your reply, removing the else: ... solved the problem. I followed the if: .. elif: .. else: .. pattern used in the chapter on forms and validators in the web2py manual. Why does it work in a single form function and why doesn't it work in a multiple form function? Since

[web2py] Re: Multiple form flash problem.

2011-03-02 Thread DenesL
On Mar 2, 3:27 am, annet annet.verm...@gmail.com wrote: Hi Denes, Thanks for your reply, removing the else: ... solved the problem. I followed the if: .. elif: .. else: .. pattern used in the chapter on forms and validators in the web2py manual. Why does it work in a single form function

Re: [web2py] Re: Multiple form flash problem.

2011-03-02 Thread Jonathan Lundell
On Mar 2, 2011, at 12:27 AM, annet wrote: Hi Denes, Thanks for your reply, removing the else: ... solved the problem. I followed the if: .. elif: .. else: .. pattern used in the chapter on forms and validators in the web2py manual. Why does it work in a single form function and why

[web2py] Re: Multiple form flash problem.

2011-03-01 Thread DenesL
Hi Annet, just remove the else: response.flash='Fill in form' parts from your code. Since you are not redirecting after an accepts it just comes back to the same controller, creating new forms and resetting the response.flash messages. On Mar 1, 8:07 am, annet

Re: [web2py] Re: Multiple form flash problem.

2011-03-01 Thread Jonathan Lundell
On Mar 1, 2011, at 7:04 AM, DenesL wrote: just remove the else: response.flash='Fill in form' parts from your code. Since you are not redirecting after an accepts it just comes back to the same controller, creating new forms and resetting the response.flash messages. This