first write the following code and than use the SQLFORM it will hide your name field
db.to_be_lawyer.name.readable = False On Mar 26, 3:31 pm, web2py_lover <lia...@gmail.com> wrote: > How to hide all fields of SQLFORM with submit button only? > > all fields of db.to_be_lawyer are 'name' and 'age'. > > I try > db.to_be_lawyer.name.default = 'default name' > db.to_be_lawyer.age.default = '28' > form_to_be_lawyer= SQLFORM(db.to_be_lawyer, fields=[], buttons > = [INPUT(_type='submit',_value="apply to be a lawyer")] ) > > but fail.