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>