[web2py] Re: Course Subscription form

2015-10-29 Thread Wadson Dias
Thanks for your help! I Solved my problem doing this: def processando(form): query = db.inscritos.Oficina =='form.vars.Oficina' if query >=1: form.errors.Oficina = "Oficina esgotada" else: pass def inscrever(): form = SQLFORM(db.inscritos) if

[web2py] Re: Course Subscription form

2015-10-24 Thread 黄祥
i think you can use the query (count() ) and check condition according to your need (if query >= value), if condition meet, redirect to another page redirect(URL(redirect) ), if not insert the data (db.table.insert() ). best regards, stifan -- Resources: - http://web2py.com -