That could work. Seems a bit uncouth, not to mention if jQuery isn't loaded that class wouldn't be added, and also that this would attach that class to every form on the page. I could hack around those things but it would be just that - a hack - and I'd prefer to do things in a robust manner.
On Fri, Apr 18, 2014 at 12:27 PM, H. Das <[email protected]> wrote: > Use jQuery: > > <script> > $('form').attr({"class":"my-class"}); > </script> > > On Wednesday, February 27, 2013 4:20:26 PM UTC-5, Chris wrote: >> >> Hello, >> >> I have a form that looks like this: >> {{top_login_form = auth.login(next = >> page_currentPath_get(request))}} >> {{top_login_form.elements('form')[0]['_class'] = >> 'login_form'}} >> {{=top_login_form.custom.begin}} >> >> Trouble is, auth.login calls SQLFORM and sets custom.begin before the >> '_class' attribute takes effect, and auth.login doesn't take custom >> attributes. It seems like the long term solution might be to have >> custom.begin be a method - in the meantime I'm probably going to overwrite >> custom.begin myself. Any suggestions? >> >> Thanks! >> > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/W1ErCdPrcIE/unsubscribe. > > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Adventure Cow<http://adventurecow.com/?utm_source=chris&utm_medium=sendingyouanemail&utm_campaign=beingafancypants>: Facebook <https://www.facebook.com/pages/Adventure-Cow/149530965095344> | Twitter <https://twitter.com/adventurecow> -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

