Integrates jQuery Watermark for z3c.form on Plone.
Project description
jQuery Placeholder
Integrates jQuery Watermark for z3c.form on Plone by
registering jquery.watermark’s JavaScript and CSS
introducing ‘’placeholder’’-directive to be used in schemas
registering value adapter to for annotated placeholder value
registering custom JavaScript to initialize watermarks
I wonder, if this product should’ve been named ‘’formwidget’’-something…
Example of Use
from zope import schema from plone.directives import form from jyu.z3cform.placeholder.directives import placeholder from zope.i18nmessageid import MessageFactory as ZopeMessageFactory _ = ZopeMessageFactory("my.domain") class MyForm(form.Schema): """An example form """ placeholder(subject=_u("Type something here..")) subject = schema.TextLine( title=_(u"Subject"), description=_("Subject of this submission"), required=True, )
Overlay Support
When you register custom form overlays in your custom JavaScript, you’d like to include placeholder support for in your JavaScript like:
$(document).ready(function() { $($('#my-form-llink').prepOverlay({ subtype: 'ajax', cssclass: 'content', formSelector: 'form', width: '40em', }).attr("rel")).bind("onLoad", function() { $(this).find("form .field").placeholder_z3cform(); }); });
Changelog
1.0b1 - 15.12.2010
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jyu.z3cform.placeholder-1.0b1.zip
(13.9 kB
view hashes)
Close
Hashes for jyu.z3cform.placeholder-1.0b1.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7377496d65e9ef3e2480d6eda04db3d06acc4947ed0da04a9b1c87eb6ffa78e |
|
MD5 | a8cd96262a5cfc52fd5b0f26ef0b133a |
|
BLAKE2b-256 | 2df822a80f1d65bb1cf56bf11a689bfadb33a0238ed012fde6d227770573b985 |