Anthony, maybe I didn't ask clearly. Here's the model: Bookmark = db.define_table( 'bookmark', Field('link','reference link',writable=False), Field('category',requires=IS_IN_SET(['work','personal'])), Field('tags','list:string'), auth.signature)
I'm talking about field "tags" ---- Here's view: {{extend 'layout.html'}} <h3>Bookmark for {{=url}}</h3> {{def show(rating,k):}}<strong>{{=rating.get(k,[0])[0]}}%</ strong>{{return}} <div> Trustworthiness: {{show(rating,'1')}} Reliability: {{show(rating,'2')}} Privacy: {{show(rating,'3')}} Child safety: {{show(rating,'4')}} </div> <img src="{{=URL('default','download',args=link.screenshot)}}" align="right"/> {{=form}} ---- I don't see anything special in view, but the field "tags" automatically adds a new text box for a new tag, after you enter a tag. How do I do this? This behavior isn't by default (I think). Thanks. On Mar 13, 8:26 pm, Anthony <abasta...@gmail.com> wrote: > On Tuesday, March 13, 2012 9:17:06 PM UTC-4, VP wrote: > > > Also, I saw in the video the field tag of type "list:string" is > > presented nicely in view in the following way: after a new tag is > > entered, a new empty textbox is added so a new tag can be added. How > > is this done? (I don't think this is the default behavior). > > In SQLFORM, the list widget is assigned to list: type > fields:http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#873 > > And the list widget includes Javascript to handle the > inputs:http://code.google.com/p/web2py/source/browse/gluon/sqlhtml.py#234. > > Anthony