Thank you Massimo, here is my situation: I would like to check if LastName and FirstName already exist in database and warn user but allow him to proceed (there are people with sam name and lastname). The idea is to issue a warning when user have just these two fields filled so that he do not fill whole form and finally find out that a person is already in database. Is javascript on client side with ajax call my best bet? Any sugestions?
Dana ponedjeljak, 1. prosinca 2014. 07:18:54 UTC+1, korisnik Massimo Di Pierro napisao je: > > It depends on where you want to do. Personally I would not do this inside > the validators. I would instead implement the checks after the form is > accepted (since you want it to proceed anyway) > > form = SQLFORM.factory(Field('number','double')) > if form.process().accepted: > if not form.vars.number == int(form.vars.number): > response.flash = 'ok but you did not insert an integer number' > .... > > > On Sunday, 30 November 2014 13:43:09 UTC-6, Alen Cerovic wrote: >> >> how to make a warning message in form based on some condition but allow >> to proceed >> validator? >> >> thnx >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.