All html attributes must be preceded by underscode as with all helpers SQLTABLE(...,_id='tablename')
On Sep 12, 10:15 am, Philip <[email protected]> wrote: > I am trying to add a table id to an HTML <table> created by SQLTABLE. > The documentation of SQLTABLE defines an optional **attributes dict > that should be passed through to the HTML table. The id attribute I > am passing is not appearing in the <table> tag. > > The relevant portion of my code is the following: > > records_data = db(...).select(...) > col_headers = {...} > return > dict(records=SQLTABLE(records_data,headers=col_headers,truncate=32,id='tablename')) > > The 'tablename' id is not appearing in the rendered HTML. > > If I'm reading the source code correctly, there is a bug, and the > variables from **attributes are never put into the HTML <table> tag. > Am I missing something? > > The relevant source code > ishttp://www.web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml-pys... > and the related Table and DIV definitions. > > Thanks, > Philip

