works for me. $ python web2py.py -S welcome >>> print OPTION(_title='test',_value='x') <option title="test" value="x"></option>
On Sunday, 25 March 2012 16:34:51 UTC-5, Alan Etkin wrote: > option = OPTION(...) > option["_title"] = "test test" > > doesn't work either? > > On 25 mar, 17:25, web-dev-m <[email protected]> wrote: > > I may not be following some sort of convention, but I'm trying to > > build a selector form element with a for loop from a query. It > > renders when i do it manually: > > > > <select> > > <option title="test test test test test"> > > </select> > > > > Howerver, > > > > when I do: > > files=db(myquery).select() > > files_as_list=[] > > for x in files: > > files_as_list+=(OPTION(x.​resource_title[0:50], value=x.id, > > _title=x.resource_title, )) > > > > the resulting html doesnt have the title attribute. I am running > > 1.99.2. > > > > Any suggestions?

