{
"info": {
"author": "Nathan Van Gheem",
"author_email": "vangheem@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Framework :: Plone",
"Programming Language :: Python"
],
"description": "Introduction\n============\n\ncollective.wtforms is plone integration with the `WTForms`__ form library.\n\n__ http://packages.python.org/WTForms/\n\nBasic Complete Form Example\n---------------------------\n\nThe basic form is constructed like so::\n\n from wtforms import Form, TextField\n from wtforms import validators\n class MyForm(Form):\n one = TextField(\"Field One\", [validators.required()])\n two = TextField(\"Field Two\")\n three = TextField(\"Field Three\")\n\n from collective.wtforms.views import WTFormView\n class MyFormView(WTFormView):\n formClass = MyForm\n buttons = ('Create', 'Cancel')\n\n def submit(self, button):\n if button == 'Create' and self.validate():\n # do fun stuff here\n self.context.value = self.form.one.data\n\nThen wire up the form with zcml::\n \n