[web2py] Re: _title tag for looped OPTION attribute

2012-03-26 Thread villas
Glad to help! Tip: start your project in the commandline: >>python web2py.py -S yourprojectname -N -M then play around to test your code snippets. On Monday, 26 March 2012 19:10:49 UTC+1, web-dev-m wrote: > > This is embarassing. Thank you. I swear, I tried and tried. > > On Mar 26, 10:25

[web2py] Re: _title tag for looped OPTION attribute

2012-03-26 Thread web-dev-m
This is embarassing. Thank you. I swear, I tried and tried. On Mar 26, 10:25 am, villas wrote: > Do this: > > files=db(myquery).select() > files_as_list=[] > for x in files: >     files_as_list.append(OPTION(x.resource_title[0:50], _value=x.id, > _title=x.resource_title, )) > > > > > > > > On S

[web2py] Re: _title tag for looped OPTION attribute

2012-03-26 Thread villas
Do this: files=db(myquery).select() files_as_list=[] for x in files: files_as_list.append(OPTION(x.resource_title[0:50], _value=x.id, _title=x.resource_title, )) On Sunday, 25 March 2012 21:25:33 UTC+1, web-dev-m wrote: > > I may not be following some sort of convention, but I'm trying t

[web2py] Re: _title tag for looped OPTION attribute

2012-03-25 Thread Massimo Di Pierro
works for me. $ python web2py.py -S welcome >>> print OPTION(_title='test',_value='x') 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 wrote: > > I may not be follow

[web2py] Re: _title tag for looped OPTION attribute

2012-03-25 Thread Alan Etkin
option = OPTION(...) option["_title"] = "test test" doesn't work either? On 25 mar, 17:25, web-dev-m 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: > > > > > > Howerv