Hi Folks,

I'm using a sqlform factory form with LOAD and seems that the form doesn't
respond when I click the submit for the first time... not sure why the post
is sent but seems that it doesn't get accepted... then if I click again it
works... is that expected?

Example of code:
*Controller*:

def my_form_loading():
    form = SQLFORM.factory(
        ..Whatever you want..)
    if form.accepts(request.vars, session, hideerror=True):
        form.vars.id = db.table.insert(field=var...)
        response.js = "do stuff"
        response.flash = 'good'
    elif form.errors:
        response.flash = 'Erro'

    return dict(form=form)

*ON a view:*

{{=LOAD('default','my_form_loading.load', ajax=True)}}



-- 

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

Reply via email to