Using the Helpers: (existing)
${h.form(h.url(action='email'), method='get')}
Email Address: ${h.text('email')}
${h.submit('Submit')}
${h.end_form()}
should be:
${h.form('email', method='get')}
Email Address: ${h.text('email')}
${h.submit('Submit','Submit')}
${h.end_form()}
Using it in your controller is pretty straight-forward: (existing)
@validate(schema=EmailForm(), form='form')
def email(self):
return 'Your email is: %s' % self.form_result.get('email')
should be (and is mentioned correctly further up the page):
def email(self):
return 'Your email is: %s' % request.params['email']
Validation only occurs on POST requests so we need to alter our form
definition so that the method is a POST: (existing)
${h.form(h.url(action='email'), method='post')}
should be:
${h.form('email', method='post')}
Url at the bottom saying 'Formbuild Manual' points to
http://formbuild.org/pylons.html
which is a 404. Url should probably be http://formbuild.org/docs/manual.html
Url at the bottom saying 'Using FormBuild in Pylons' points to
http://formbuild.org/pylons.html which is also a 404. Url should
probably be http://formbuild.org/docs/pylons.html
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---