I think you need to put in your field: writable=False, readable=False
Field('Latitude', 'double', writable=False, readable=False)),
Field('Longitude', 'double', writable=False, readable=False))On Aug 8, 2:21 am, Rob <[email protected]> wrote: > I have a model that has a 'Address', 'Lat' and "Lon' field. When the > user enters an address, some javascript currently populates the 'Lat' > and 'Lon' fields and they get inserted into the DB via crud.create() > or crud.update(). > > How do I hide these fields from the user, but allow the JS to insert > the correct values? Idealy, I would like to turn these fields from > input fields to hidden fields. > > Possible? > > just for reference: > model: > db.define_table('Dinners', > Field('Address', requires=IS_NOT_EMPTY()), > Field('Latitude', 'double'), # <== I want this to be a hidden > field > Field('Longitude', 'double')) # <== I want this to be a hidden > field > > controller: > def Create(): > crud.settings.formstyle='table2cols' > form = crud.create(db.Dinners) > return dict(form=form) > > view: > {{=form}} > > Thanks!

