Re: [web2py] Custom login form error display
> > > Note, if you use form.custom.widget.fieldname in a custom form, you still > get errors displayed automatically (the error is part of the widget > object). The example linked above shows the hiderror option being used. In > that case, you are explicitly suppressing the automatic error display (this > affects standard forms as well as custom forms). In the example shown, > instead of showing errors within the form itself (the default automatic > behavior), the errors are manually inserted all together at the top of the > form. > > I have a similar problem, but a bit more complicated... I have a SQLFORM (form) and a SQLFORM.grid (grid) in one view. The grid can be edited, and one of the fields uses a custom widget. I have no clue how to get to the errors of that field to show them properly. If I use the form.errors, I get only the errors for the 'form'. How do I get the errors for the 'grid'? I tried grid.errors, but only get an error saying that DIV element has no attribute 'errors'... Any thoughts? Krzysztof. -- 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.
Re: [web2py] Custom login form error display
I got the errors working. I forgot to use form.errors like you said. Do you guys also know of a way to show an error if the password is incorrect? -- 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/groups/opt_out.
Re: [web2py] Custom login form error display
Look at the http://web2py.com/books/default/chapter/29/07/forms-and-validators#Hide-errors. I think the errors are not displayed as usual, the moment you start working with a customized form. You will need to handle that too. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On 11/7/2013 2:05 AM, Ruud Schroen wrote: Hi, I am building my login form with the form.custom.widget, because I don' like the standard layout of the forms. Now the problem is, I can't get the errors to display. -- 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/groups/opt_out.
Re: [web2py] Custom login form error display
On Thursday, November 7, 2013 8:24:19 PM UTC-5, Kiran Subbaraman wrote: Look at the http://web2py.com/books/default/chapter/29/07/forms-and-validators#Hide-errors. I think the errors are not displayed as usual, the moment you start working with a customized form. Note, if you use form.custom.widget.fieldname in a custom form, you still get errors displayed automatically (the error is part of the widget object). The example linked above shows the hiderror option being used. In that case, you are explicitly suppressing the automatic error display (this affects standard forms as well as custom forms). In the example shown, instead of showing errors within the form itself (the default automatic behavior), the errors are manually inserted all together at the top of the form. Anthony -- 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/groups/opt_out.