If you make a view for your form this will help you control it.
If you use FORM(...) instead of SQLFORM()  this will not generate tables.

See http://mdp.cti.depaul.edu/examples/static/cookbook.pdf

Then you will need to name the fields in your form, and update the data
record - since you have one field, this is not too bad.

On Mon, Feb 23, 2009 at 5:36 PM, murray3 <[email protected]> wrote:

>
> thanks Yarko for that, it works, I was approaching this from the view,
> not the controller.
> one more thing I am stuck with, how do I modify the SQLFORM formatting
> to only have
> a textarea - i.e. no table, no labels, just textarea and submit?
> chris
>
> On Feb 23, 5:03 am, Yarko Tymciurak <[email protected]> wrote:
> > ugh...never write email before dinner:
> >
> > On Sun, Feb 22, 2009 at 8:54 PM, Yarko Tymciurak <[email protected]>
> wrote:
> >
> > > Something like this works - but you may not want to define your own
> >
> > you may _want_ to define your own template....
> >
> >
> >
> > > template:
> >
> > > in models/db.py:
> > > db.define_table('comment',
> > >                SQLField( 'comment','text', length=256 ))
> >
> > > then in controllers/default.py:
> >
> > > def myform():
> > >    form=SQLFORM(db.comment, _style='width:100%')  # this gets
> > > inserted in the <form....
> > >    if form.accepts(request.vars, session):
> > >        response.flash='form accepted'
> > >    elif form.errors:
> > >        response.flash='form has errors'
> > >    return dict(form=form)
> >
> > > Regards,
> > > Yarko
> >
> > > On Feb 22, 5:50 pm, murray3 <[email protected]> wrote:
> > > > I have been enjoying the flexibiity of web2py, and my app idea is
> > > > progressing
> > > > well, it is something I have been contemplating for a long time and I
> > > > will release it
> > > > when I get it to a suitable stage as to take it further it needs to
> be
> > > > open source.
> >
> > > > So with that in mind, I would like to solve my most irritating issue
> > > > with which I am obviously
> > > > missing something even trying the code offered up in these
> > > > discussions!
> >
> > > > I want a sqlform with just a textarea and submit button but I want
> the
> > > > textarea to be
> > > > style="width: 100%;" easy, but unfortunatley my attempts are not
> > > > updating the db.
> >
> > > > Any help most appreciated .
> > > > chrism
> >
> >
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to