I don't remember the syntax for HTML forms. Inevitably, when I'm starting a project, I need to go look up the basics. Then, I usually reuse the template that I come up with and don't look back. Here are some notes on those basics...
there is the python module webhelpers that will help in generating form markup, if you like. | http://pypi.python.org/pypi/WebHelpers | http://webhelpers.groovie.org/
This also turns out to be a good reference for common html tags, even if you don't want to generate them: | http://webhelpers.groovie.org/modules/html/tags.html
to start working with forms, you will new to methods to a class... one to show the form, one to handle the form.
you will also need to import the validate code. (formencode)
layouts and other form validation can be stored with other model code (I'm torn if that is more UI or model validation... pylons seems to go with model validation).
Pylons comes with an easy to use validate decorator, imported by default in your lib/base.py. Using it in your controller is pretty straight-forward:
#this gets the validate decorator. from pylons.decorators import *
to start working with forms, you will new to add methods to a class... one to show the form, one to handle the form.
you will also need to import the validate code. (formencode)
layouts and other form validation can be stored with other model code (I'm torn if that is more UI or model validation... pylons seems to go with model validation).
Pylons comes with an easy to use validate decorator, imported by default in your lib/base.py. Using it in your controller is pretty straight-forward:
#this gets the validate decorator. from pylons.decorators import *