Oh thats a nicer thing to do...

So right into db.py I could write say
db.poll.question.label = 'Question here'

Could I ? :)


On Mar 24, 8:26 pm, 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.

Reply via email to