My answer was wrong. Your question was correct and I apologize. I checked the code again.
I tried: >>> SQLFORM(db.auth_user,fields=['first_name'],labels={'first_name':'Your >>> Name'}).xml() '<form action="" enctype="multipart/form-data" method="post"><table><tr id="auth_user_first_name__row"><td class="w2p_fl"><label for="auth_user_first_name" id="auth_user_first_name__label">Your Name</label></td><td class="w2p_fw"><input class="string" id="auth_user_first_name" name="first_name" type="text" value="" /></td><td class="w2p_fc"></ td></tr><tr id="submit_record__row"><td class="w2p_fl"></td><td class="w2p_fw"><input type="submit" value="Submit" /></td><td class="w2p_fc"></td></tr></table></form>' and as you can say it works. Still fields and lables are only there for backward compatibility and I consider them deprecated (so much that I forgot about them). I recommend using db.table.field.label='....' db.table.field.readable=True or False db.table.field.writable=True or False form.labels is not defined because according to current design labels are a property of the individual fields and not of the form object. On Mar 24, 10:26 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > You do not specify the field labels at the level for the form > > form=SQLFORM(...,labels=...) #<<<< WRONG > > You specify them at the level of the fields > > db.table.field.label='...' > form=SQLFORM(db.table) > > Massimo > > On Mar 24, 9:28 am, Abhishek Mishra <ideam...@gmail.com> wrote: > > > Hi guys, > > > I am trying to learn/try out web2py from scratch. I'm making a simple > > poll application right now. > > > So, to add a poll, I'm trying to use automatically generated SQLFORMs > > as in - > > > pollform=SQLFORM(db.poll, fields=['question'], > > labels={'question':'Poll Question'}) > > > I was looking for a way to remove submit button from a particular > > SQLFORM. > > I digged > > throughhttp://www.web2py.com/examples/static/epydoc/gluon.sqlhtml-pysrc.html... > > and tried things like - > > > pollform=SQLFORM(db.poll, fields=['question'], > > labels={'question':'Poll Question'}, submit_form='') > > pollform=SQLFORM(db.poll, fields=['question'], > > labels={'question':'Poll Question'}, submit_form=None) > > > ^ None of them actually did the work, is there a way to do this? If > > not then would specifying submit_form=None be a nice way to remove the > > submit button, or am I missing something? > > > Thanks, > > > Abhishek -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.