Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install collective.z3cform.html5widgets

How to install collective.z3cform.html5widgets

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install collective.z3cform.html5widgets
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
0.1 Available View build log
Linux (32-bit)
0.1 Available View build log
Linux (64-bit)
0.1 Available View build log
 
License
gpl
Lastest release
version 0.1 on Mar 22nd, 2013

Introduction

This addon provide the following HTML5 widgets:

  • color
  • contenteditable (+wysiwyg)
  • datalist
  • date
  • datetime
  • datetime-local
  • email
  • month
  • number
  • password
  • range
  • search
  • tel
  • time
  • url
  • week

Status: young

TODO

  • less copy/paste where it's possible
  • add tests
  • add support of datalist
  • add contenteditable widget for Text and TextLine

How to install

This addon can be installed has any other addons. please follow official documentation. It doesn't provide any profile, so you juste have to add it to your zope install.

If you want to support theses widgets on incapable browser you must consider using polyfill.

Some addons which provide polyfills:

  • collective.js.webshims

Widgets review & support

datalist
color

Use it with zope.schema.ASCIILine field:

from zope import schema
from zope import interface
from z3c.form import form, field
from collective.z3cform.html5widgets.widget_color import ColorFieldWidget
class ExampleSchema(interface.Interface):
    color = schema.ASCIILine(title=u"Color", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
    fields['color'].widgetFactory = ColorFieldWidget
contenteditable

browsers supports:

  • Chrome: 4.0+
  • Safari: 3.1+
  • Safari mobile: 5.0+
  • Firefox: 3.5+
  • Opera: 9.0+
  • Opera mini/mobile: N/A
  • Internet Explore: 5.5 (sic)
  • Android: 3.0+

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
class ExampleSchema(interface.Interface):
    pass
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
date

Example:

from zope import schema
from zope import interface
from z3c.form import form, field

class ExampleSchema(interface.Interface):
    date = schema.Date(title=u"Date (created)", required=False)

class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
datetime

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
class ExampleSchema(interface.Interface):
    datetime = schema.Datetime(title=u"Date time (modified)", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
datetime-local

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
class ExampleSchema(interface.Interface):
    datetime = schema.Datetime(title=u"Date time (modified)", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
email

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
from collective.z3cform.html5widgets.widget_email import EmailFieldWidget
class ExampleSchema(interface.Interface):
    email = schema.ASCIILine(title=u"Email", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
    fields['email'].widgetFactory = EmailFieldWidget
month

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
from collective.z3cform.html5widgets.widget_month import MonthFieldWidget
class ExampleSchema(interface.Interface):
    month = schema.Date(title=u"Month", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
    fields['month'].widgetFactory = MonthFieldWidget
number

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
from collective.z3cform.html5widgets.widget_number import NumberFieldWidget
class ExampleSchema(interface.Interface):
    number = schema.Int(title=u"Number", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
    fields['number'].widgetFactory = NumberFieldWidget
password

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
class ExampleSchema(interface.Interface):
    password = schema.Password(title=u"Password", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
range

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
from collective.z3cform.html5widgets.widget_range import RangeFieldWidget
class ExampleSchema(interface.Interface):
    range = schema.Int(title=u"Range", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
    fields['range'].widgetFactory = RangeFieldWidget
tel

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
from collective.z3cform.html5widgets.widget_tel import TelFieldWidget
class ExampleSchema(interface.Interface):
    tel = schema.ASCIILine(title=u"Telephone", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
    fields['tel'].widgetFactory = TelFieldWidget
time

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
class ExampleSchema(interface.Interface):
    time = schema.Time(title=u"Time", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
url

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
class ExampleSchema(interface.Interface):
    url = schema.URI(title=u"URL", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
week

Example:

from zope import schema
from zope import interface
from z3c.form import form, field
from collective.z3cform.html5widgets.widget_week import WeekFieldWidget
class ExampleSchema(interface.Interface):
    week = schema.Date(title=u"Week", required=False)
class ExampleForm(form.Form):
    fields = field.Fields(ExampleSchema)
    fields['week'].widgetFactory = WeekFieldWidget

Credits

People

Changelog

0.1 (2013-03-21)
  • Package created using templer [JeanMichel aka toutpt]

Subscribe to package updates

Last updated Mar 22nd, 2013

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.