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 and why doesn't it work in a multiple form
> function?

For it to work the same you would have to nest the IFs differently,
simulating a CASE statement from other languages.

> > 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.
>
> Should I redirect after an accepts? The view has a two column layout,
> the left column contains a search form the right column displays the
> search results.

That depends on your app's logical flow.

> Hi Jonathan,
>
> Thanks for your reply. I added the response.flash='Fill in form' line
> of code before the first call to accepts, the actual text contains
> more than just the 'Fill in form' directive.
>
> Kind regards,
>
> Annet.

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 and why doesn't it work in a multiple form
> function?
>
> > 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.
>
> Should I redirect after an accepts? The view has a two column layout,
> the left column contains a search form the right column displays the
> search results.
>
> Hi Jonathan,
>
> Thanks for your reply. I added the response.flash='Fill in form' line
> of code before the first call to accepts, the actual text contains
> more than just the 'Fill in form' directive.
>
> Kind regards,
>
> Annet.

Reply via email to