megrok.form released!
Dirceu Pereira Tiegs has released megrok.form, an extension library that adds a lot of useful fields and widgets to Grok.
megrok.form is a helper package that provides some useful fields, widgets and constraints for Grok.
Fields
- Email, a TextLine field with a default contraint
- HTML, a Text field that uses z3c.widget.tiny
- File, from collective.namedfile
- Image, from collective.namedfile
Widgets
megrok.form overrides the default widgets for:
- zope.interface.schema.Date (using zc.datetimewidget.widget.DateWidget)
- zope.interface.schema.Datetime (using zc.datetimewidget.widget.DatetimeWidget)
And adds new widgets for Image and File (from collective.namedfile).
Validators/constraints
megrok.form adds constraints for:
- SSN
- US Phone Numbers
- International Phone Numbers
- Zip Code
- URL
You can add these to your application by listing 'megrok.form' as a dependency in your project's setup.py file and adding a <include package="megrok.form" /> to your project's configure.zcml. See the make use of add-ons tutorial for more information.
If you want to help out with the code and add more useful fields and widgets, it is available at http://svn.zope.org/megrok.form, and you can check it out using svn+ssh://svn.zope.org/repos/main/megrok.form/trunk. Let us know what you're thinking about on grok-dev and have fun!

