Is there a working bootstrap3 formstyle for auth?

317 views
Skip to first unread message

Richard Penman

unread,
May 22, 2015, 3:34:03 AM5/22/15
to web...@googlegroups.com
Hello,

Is there a working boostrap3 formstyle for auth?

I tried:
auth.settings.formstyle = 'bootstrap3'
auth.settings.formstyle = SQLFORM.formstyles.bootstrap3_stacked
auth.settings.formstyle = SQLFORM.formstyles.bootstrap3_inline

All of these added bootstrap3 to the form but some parts were messed up, such as "remember be" checkbox for login and "verify password" for register.
Is there a working style function for bootstrap3?

Richard

Richard Penman

unread,
May 22, 2015, 3:47:19 AM5/22/15
to web...@googlegroups.com
well, here is a temporary workaround:

auth.settings.remember_me_form = False
auth
.settings.register_verify_password = False

Richard Baron Penman

unread,
May 22, 2015, 10:11:32 AM5/22/15
to web...@googlegroups.com
I tried those bootstrap styles from latest source and they seem to
work well for SQLFORM, however face problems for the non-standard
features in the auth forms mentioned.

On Fri, May 22, 2015 at 8:40 PM, 黄祥 <steve.van...@gmail.com> wrote:
> the newest version of web2py that have bootstrap 3 scaffolding app, is
> maintain in private/appconfig.ini and define the formstyle in models/db.py
> e.g.
> models/db.py
> response.formstyle = myconf.take('forms.formstyle')
>
> private/appconfig.ini
> [forms]
> formstyle = bootstrap3_inline
> ;formstyle = bootstrap3_stacked
> ;formstyle = bootstrap
> ;formstyle = table3cols
> ;formstyle = table2cols
> ;formstyle = divs
> ;formstyle = ul
>
> just remove the ";" to choose the formstyle u like.
>
> best regards,
> stifan
>
> --
> 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/pjRbVAd5lt8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Niphlod

unread,
May 22, 2015, 2:58:56 PM5/22/15
to web...@googlegroups.com
uhm. could you point out what are the pages of the scaffolding app you're referring to ? they don't seem that bad to me.

Richard Baron Penman

unread,
May 26, 2015, 9:59:38 AM5/26/15
to web...@googlegroups.com
I wasn't using the scaffolding app, just setting the formstyle and
then checking the user login/register forms.

Niphlod

unread,
May 26, 2015, 3:45:25 PM5/26/15
to web...@googlegroups.com
ok, rephrasing... why is it fine in the scaffolding app and not in yours ?

Richard Penman

unread,
Jun 1, 2015, 9:39:25 AM6/1/15
to web...@googlegroups.com
Thanks, got it working. I found needed to update web2py to latest version - couldn't just copy this bootstrap3 formstyle function into my current install.

黄祥

unread,
May 22, 2015, 8:40:59 AM5/22/15
to web...@googlegroups.com

Alexander Hoch

unread,
Jan 22, 2020, 12:09:24 AM1/22/20
to web2py-users

Thx, that solved my problem after I reloaded my old web2py app.
When generating SQLFORM an error "Formstyle not supported occurs".
I added 
[forms]
formstyle = bootstrap4_inline
separator =
 to appconfig.ini 
and it works. 
Reply all
Reply to author
Forward
0 new messages