Thanks Antony You have to include code in the view to conditionally show the error > messages when they are present
If I use the alternative you mentioned I will have to manipulate the inputs classes because I am using query.payment.js to validate and format some of the fields. If the code is simple I will go with the first option if I can find that code On Thursday, July 6, 2017 at 4:38:09 PM UTC+2, Anthony wrote: > > You have to include code in the view to conditionally show the error > messages when they are present. Alternatively, you can use this approach to > creating custom form markup: > http://web2py.com/books/default/chapter/29/07/forms-and-validators#Custom-forms. > > Using the form.custom.widget.fieldname widgets will include the default > error messages automatically when they are present. > > Anthony > > On Thursday, July 6, 2017 at 8:33:06 AM UTC-4, icodk wrote: >> >> I build a form like explained in : >> >> http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-in-HTML >> which man that I build an html form in the view and doesn't pass the >> form to the view >> >> The form has a name field >> >> In my onvalidation function I set >> form.errors.name="Name is not valid" >> >> The form is not submitted as expected but the standard web2py error >> message that usually shows up just under the field in error does not shows >> up. >> How can I show the error? >> > -- 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.