@mostwanted
In my case your code working as you expected. what web2py version you are
using?
You can try this

def search():
    form=SQLFORM.factory(Field('SEARCH', requires=IS_NOT_EMPTY()),
                         widget = lambda field, value:
SQLFORM.widgets.string.widget(
            field, value, _class='my-string', _id='searching',
_placeholder='SEARCH BY COMPANY NAME'
        ),formstyle='table3cols')
    searchBtn=form.element('input',_type='submit')
    form['_style'] = "border:none;box-shadow:none;"
    if form.accepts(request):
        tokens=form.vars.SEARCH.split()
        query=reduce(lambda a,b:a&b, [db.Client_Details.company.contains(k)
for k in tokens])
        company=db(query).select(orderby=db.Client_Details.company)
    else:
        company=[]
    return locals()


Thanks
SP

On Thu, Jan 10, 2019 at 11:13 AM mostwanted <godirao...@gmail.com> wrote:

> Is there a way to edit and customize the default *formstyle* styling? I
> am trying to place a form label on top of my sqlform.factory form with
> formstyle='table3cols' & i am able to get the desired results but there is
> extra stuff i do not want, my form now has a border around it and a
> box-shadow which both of them i never defined, i want them out! What do it
> do?
> *CODE:*
> def search():
>     form=SQLFORM.factory(Field('SEARCH', requires=IS_NOT_EMPTY(), widget =
> lambda field, value: SQLFORM.widgets.string.widget(field, value, _class=
> 'my-string', _id='searching', _placeholder='SEARCH BY COMPANY NAME')), ,
> formstyle='table3cols')
>     searchBtn=form.element('input',_type='submit')
>     searchBtn['_style'] = 'display:none;'
>     if form.accepts(request):
>         tokens=form.vars.SEARCH.split()
>         query=reduce(lambda a,b:a&b, [db.Client_Details.company.contains(k
> ) for k in tokens])
>         company=db(query).select(orderby=db.Client_Details.company)
>     else:
>         company=[]
>     return locals()
>
>
> Mostwanted
>
> --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to