ComboCalendarWidget

by Tareq Alam last modified Feb 16, 2011 02:06 AM

Sometime in forms we have some questions like "if the event happened please specify when happened" then we need two fields one with saving value of answer of if happened or not one for date. This widget combines these two for the convenience. also this has JavaScript code that enables hide show of date based on decision. This also works in plone 4

Project Description

ComboCalendarWidget

 To install this download the package.

Unzip and place it into products folder

install via quickinstaller

from Products.ComboCalendarWidget.ComboCalendarWidget import ComboCalendarWidget

then in schema

 LinesField(
        name='testComboCalendar',
        schemata='default',
        vocabulary="VOCAB_YES_NO_NONA",
        required=1,
        widget=ComboCalendarWidget(
            label='Have the patient is diagnosed with cancer',
            description='if yes please provide the date of diagnose',
            label_msgid='msgid',
            i18n_domain='plone',
            show_ymd=True,
            show_hm=False,
            format="%d%b%Y",
            show_calendar_value='YES_NO_NONA_NO', # defines which value will show the date field
            starting_year=1990
        )
    ),

Self-Certification

[X] Internationalized

[ ] Unit tests

[ ] End-user documentation

[X] Internal documentation (documentation, interfaces, etc.)

[ ] Existed and maintained for at least 6 months

[X] Installs and uninstalls cleanly

[X] Code structure follows best practice

Current Release

No stable release available yet.

All Releases

Version Released Description Compatibility Licenses Status
1.0 beta release More about this release…
Plone 4
Plone 3
GPL alpha

Comments (0)