if you mean custom view of SQLFORM you can try something like this: def your_controller() ... form=SQLFORM(...) # or SQLFORM.factory ... form.process() ... # creating view - must be after form.process()
fcw = form.custom.widget # see web2py book fcl = form.custom.label v_div = DIV() # main container v_div.append(STYLE( 'table>tbody>tr>td {height:40px;}' )) tbl = TABLE(_class='table table-bordered table-hover') tbl.append(TR( fcl.field_1 , fcw.field_1 )) # - pair label/input tbl.append(TR( fcl.field_2 , fcw.field_2 )) fcw.field_1['_style']='background-color:gray' v_div.append(tbl) v_div.append(form.custom.submit) v_div.append(form.custom.end) return dict(v=v_div) On Thursday, December 17, 2015 at 9:12:00 AM UTC+3, Sujata Aghor wrote: > > > how to wrap an already existing input element in a new div in web2py > -- 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.