I also like to keep the cheet sheet open while I work. IT is a great
QUICK reference, when the searching the Manual takes too long for
simply the names of things.
http://www.web2py.com/examples/static/web2py_cheatsheet.pdf

For custome HTML forms check the Manual page 194 (SQLFORM in HTML).
http://www.scribd.com/doc/19211452/Web2py-Manual

Enjoy!




On Sep 22, 11:43 pm, Fran <francisb...@googlemail.com> wrote:
> On Sep 23, 5:46 am, Arvind <arvind.ran...@gmail.com> wrote:
>
> > > print dir(form) - to get variables/methods
> > > print dir(form.attributes) - dict of attributes (formname, id, etc.)
> > I might sound really silly. Where do i place the print command ? it
> > wont work in the controller or in the view.
>
> Web2Py shell.
> Either at OS CLI or via the appadmin CLI.
>
> I do loads of little experiments/explorations in the shell to try
> stuff out quickly before transferring to the text files that make up
> the app.
>
> > and I am still not clear....
> > if I have a form, like this
> >     form = FORM("your name:",
> >                  INPUT(_name="yourname",requires=IS_NOT_EMPTY()),
> >                  INPUT(_type="submit"))
>
> I don't find it terribly useful to use FORM - using SQLFORM or crud is
> generally more useful.
>
> > How can i place the elemets of the form in a customized way....
> > something like this
> > <table>
> >      <tr> <td> {{=form.label}} </td> </tr>
>
> Not sure about FORM, but SQLFORM is:
> {{=form.custom.begin}}
> {{=form.custom.label.myfield}}
>
> >      <tr> <td> {{=form.input._name}} </td> </tr>
>
> Likewise
> {{=form.custom.widget.myfield}}
>
> >      <tr> <td> {{=form.submit}}</td> </tr>
>
> {{=form.custom.submit}}
> {{=form.custom.end}}
>
> > Note... in the above example, I have chosen to place the submit button
> > after 3 rows... this way, i get to place my form, in my own way,
> > rather than web2py automatically placing them in a table or in its own
> > way.
>
> This is the whole point of custom forms, yes - you get all the
> benefits of the self-processing forms, whilst retaining the ability to
> keep full control of the layout.
>
> F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@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