Thanks for your comments.

You can fix your problem by replacing:

  if inputform.accepts
(request.vars,session,formname='form_newflexiblecost'):

with

  if inputform.accepts(request.vars,formname=None):

This is because web2py does some "magic" to prevent double form
submission and this is achieved by adding some hidden fileds in the
form. Since you validate the form using an ajax request you are
bypassing all of this so you want a plain form submissions without
hidden fields.

Massimo

On Jun 21, 12:00 pm, matkolbe <[email protected]> wrote:
> Hi Massimo ,
>
> first of all, I hated python, cause I was trying to totally reprogram
> a webapp. Then a friedn of mine, Peter (writting an article bout
> web2py), I think you also know him :o), told me about your framework -
> and now I love python :o)
>
> REALLY GREAT/BRILLIANT WORK!!!
>
> Now to the problem:
> The form is global, my controller lokked like this:
> controller.py:
> inputform=Form(-code above-)
>
> def index():
>    bla,bla
>    return dict(inputform=inputform)
>
> def insert_flexiblecost():
>   code above
>
> The ajax request has all params and enters the function, but as told,
> the successvalue is always -1
>
> I also tried to define the inputform inside both, the index() and the
> insert_felx...() but it won't work either...
>
> If you have no idea I'll check the code again, but I debugged already
> with firefox firebug, every thing seems to be ok, no tickets created,
> no invalid response...
>
> grettings from augsburg,
> matthew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to