SQLFORM button position

39 views
Skip to first unread message

Maurice Waka

unread,
Mar 22, 2020, 6:38:27 PM3/22/20
to web2py-users
I came across this code

model:

def widget(**kwargs):
   
return lambda field, value, kwargs=kwargs: SQLFORM.widgets[field.type].widget(field, value, **kwargs)


db
.define_table('posting',
               
Field('author', 'reference auth_user', default=auth.user_id, writable=False, readable=False),
               
Field("message", 'string', length=512,  widget=widget(_placeholder='Type your message here', _style="border:1px solid #78E5E3; position:fixed; bottom:0px; left:0px;")),
                auth
.signature
               
)


In view...post.load


<div class="bottom_wrapper" id="footer">
   
<form action="" enctype="multipart/form-data" method="post" class="form-horizontal" style="margin-bottom: 0px; align:center; align-items: stretch;">
   
{{=form.custom.begin}}
       
<div class="col-md-1 col-lg-2" ></div>
           
<div class = "col-xs-8 col-md-6">
               
{{=form.custom.widget.message}}
           
</div>
            <div class = "col-xs-4 col-md-4" >
                {{=form.custom.submit}}      
            </
div>
   
{{=form.custom.end}}
</div>  


My issue is that the submit button is positioned at the top of the page while the textarea at the button as shown in the code.
How Can I position the button at the bottom, float-right position?
Regards

Maurice Waka

unread,
Mar 24, 2020, 2:15:11 AM3/24/20
to web...@googlegroups.com
Solution found.
Regards 

--
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/3NwBhKSWkqU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/f09f0d62-5e8b-4ff7-9680-db14ce305255%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages