pass comment value to field definition?
,comment="This is my instruction on how to fill this field"
Field('author_name', 'string', length=255, default="", label=("Your
name"), comment=T("Your name")),
2011/4/12 niknok <[email protected]>
> This is how I use it right now.. Looking for a way to change
> 'instruction' field.
>
> form=SQLFORM.factory(
> Field('instruction','text', writable=False, default='Extra text to
> display'),
> Field('f1', 'string'))
>
> On Apr 12, 10:00 am, DenesL <[email protected]> wrote:
> > Can you provide an example of what you want?.
> >
> > On Apr 11, 8:57 pm, niknok <[email protected]> wrote:
> >
> >
> >
> > > Yes, I know it can be done in Views. What I was wondering about is how
> > > to do so from the controller.
> >
> > > On Apr 11, 10:07 pm, Johann Spies <[email protected]> wrote:
> >
> > > > On 10 April 2011 23:42, niknok <[email protected]> wrote:
> >
> > > > > This might sound too basic, but I couldn't find out how to display
> extra
> > > > > text in across the width of the whole form table.
> >
> > > > > Right now, I do it this way (which only displays in the input
> column) but I
> > > > > wonder what's the web2py way?
> >
> > > > > form=SQLFORM.factory(
> > > > > Field('instruction','text', writable=False, default='Extra text
> to
> > > > > display'),
> > > > > Field('f1', 'string'))
> >
> > > > What I do is to use a custom form layout and handle the extra text in
> the
> > > > view. Check the Book:
> http://web2py.com/book/default/chapter/07?search=custom+form#Custom-f....
> >
> > > > Regards
> > > > Johann
> >
> > > > --
> > > > May grace and peace be yours in abundance through the full knowledge
> of God
> > > > and of Jesus our Lord! His divine power has given us everything we
> need for
> > > > life and godliness through the full knowledge of the one who called
> us by
> > > > his own glory and excellence.
> > > > 2 Pet. 1:2b,3a
>
--
My blog: http://martin.tecnodoc.com.ar
Expert4Solution: http://www.experts4solutions.com/e4s/default/expert/6
http://www.cvstash.com/profile/Xzi5bWCdD