On Wednesday, April 24, 2019 at 5:25:00 AM UTC-7, Константин Комков wrote: > > It's a good instrument for web2py take developers validate form on client. > Maybe add it in web2py? >
Client-side validation has value, but the server should never trust data that is client-side validated ... too easy to be manipulated. So check that data has the proper form, and even that it is consistent with other fields, but still validate (and sanitize) on the server. One way is to use the JQuery that is already wired in. In your view, add <script> jQuery(document).ready(function(){ jQuery('#QuarterMaster_IssueYr').blur(function(){ alert("setting bang"); }); </script> This is simplified from my actual code, and you may prefer to use something other than OnBlur; my goal was to move to the right "next field" when IssueYr was completed, and that depends on the value of IssueYr. /dps -- 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.