[web2py] Re: changing the look of a form
Login form like all web2py forms has an argument 'formstyle' that can take following values 'table3cols', 'table2cols', 'divs', 'ul' and 'bootstrap' Latter is not documented. Therefore, for login form simply apply in your controller (or also in model) but before auth.form call auth.settings.formstyle = 'bootstrap' and web2py will render the html of the form as bootstrap one without manually adding any code. In order to change the form's look a simple way is: # in controller form = SQLFORM(...) if isinstance(form, FORM): form['_class'] = 'new-look' return dict(form=form) Now you are able to change the look via new-look css class Il giorno martedì 20 novembre 2012 02:38:12 UTC+1, Daniele ha scritto: > > You're going to have to change the style via CSS. If it's an inbuilt form > in web2py like the login one, good luck :P you will have to use the custom > form widgets and do a bunch of somersaults. Try following this guide, it > may help: > http://web2py.com/book/default/chapter/07#FORM > > On Wednesday, November 14, 2012 8:58:45 PM UTC, Hector Magnanao wrote: >> >> how do you change the look of a form (i.e. background color, fonts, >> etc...) ? > > --
[web2py] Re: changing the look of a form
somersaults ? Login form is just a normal form containing 2 fields, username (or email) and password, and an optional "remember me". Edit the default/user.html and you're good to go. Anyway, the part on custom forms is a little later on the chapter. http://web2py.com/book/default/chapter/07#Custom-forms On Tuesday, November 20, 2012 2:38:12 AM UTC+1, Daniele wrote: > > You're going to have to change the style via CSS. If it's an inbuilt form > in web2py like the login one, good luck :P you will have to use the custom > form widgets and do a bunch of somersaults. Try following this guide, it > may help: > http://web2py.com/book/default/chapter/07#FORM > > On Wednesday, November 14, 2012 8:58:45 PM UTC, Hector Magnanao wrote: >> >> how do you change the look of a form (i.e. background color, fonts, >> etc...) ? > > --
[web2py] Re: changing the look of a form
You're going to have to change the style via CSS. If it's an inbuilt form in web2py like the login one, good luck :P you will have to use the custom form widgets and do a bunch of somersaults. Try following this guide, it may help: http://web2py.com/book/default/chapter/07#FORM On Wednesday, November 14, 2012 8:58:45 PM UTC, Hector Magnanao wrote: > > how do you change the look of a form (i.e. background color, fonts, > etc...) ? --