Does SQLFORM support "onvalidation"?

8 views
Skip to first unread message

Dave S

unread,
Sep 15, 2023, 3:23:07 PMSep 15
to web2py-users
Short answer:  YES

I was having trouble with "onvalidation" ... the code didn't seem to be running.  So I was going to ask if SQLFORM supported it ... but [blush] when preparing my question, I realized I had set the option on the wrong form.  (I have a ping-pong pair of forms ... you enter data for table A in one form, are redirected to the form for table B, which then redirects back to the A form.   The validation is needed for B, and I had set the option in the other form.

I'm kind of surprised that didn't cause a ticket, because the validation code was asking for a form.vars.b_of_B that wasn't part of A's form.vars.

Anyway, just another example of trying to blame Web2py when the error was between keyboard and chair.

/dps


Reply all
Reply to author
Forward
0 new messages