somewhere before your SQLFORM(),a statement such as:
cynotedb.comment.body.default='hello'
will pre-populate.
This should work the same way before calling a t2 form creating function.
On Mon, Dec 1, 2008 at 9:39 PM, MadWalker <[EMAIL PROTECTED]> wrote:
>
> i need to know that if i can insert a default value if i do not want
> to type the text in
> '
> comments=SQLFORM(cynotedb.comment,fields=['author','entry_id','body')
> this is the code for the form i using
> can i do something like
> comments=SQLFORM(cynotedb.comment,fields=['author','entry_id'])
> and the 'body' will have a default value like "hello" insert in it
>
> the end result will show "ABC say hello"
> the view code showing of the comment is by
> "{{=comment.author}} say {{=comment.body}}"
>
> is it possible
> if so,
> how can i do it?
>
> pls pardon my english
> Good day
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---