[web2py] Re: Form hidden field

2013-04-11 Thread Anthony
> > Is there i way that i could make my gps_x and gps_y fields read-only so > field are rendered as form.element('input[name=gps_x]').update(_readonly=True) or Field('gps_x', ..., widget=lambda f, v: SQLFORM.widgets.double.widget(f, v,_readonly =True)) Anthony -- --- You received this

[web2py] Re: Form hidden field

2013-04-11 Thread Anthony
You can also set the zoom field's readable and writable attributes to False and instead construct a separate hidden field storing the value: SQLFORM(..., hidden=dict(zoom=[the value])) Anthony On Thursday, April 11, 2013 11:00:41 AM UTC-4, Domagoj Kovač wrote: > > I managed to do it with: > > {

[web2py] Re: Form hidden field

2013-04-11 Thread Domagoj Kovač
I managed to do it with: {{form.custom.widget.zoom["_hidden"] = "hidden"}} On Thursday, April 11, 2013 4:46:44 PM UTC+2, Domagoj Kovač wrote: > > Hi, > > i have a problem. > > This is my table definition. > > db.define_table('locations', > Field('name', 'string', >