collective / collective.easyform

Forms for Plone

Home Page:https://pypi.org/project/collective.easyform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

depends_on not working with choice or yes/no field

Nimo-19 opened this issue · comments

commented

I Installed a plain plone5.2, easyform 3.2.1 and plone.patternslib

If I copy the example from the Readme by creating a yes/no-field 'Extra InFo' set to Singlecheckbox
and add a depends_on condition: form.widgets.extra_info; on another field

The field is hidden but does not appear when the checkbox is activated.

When I use the condition: form.widgets.extra_info:list; from the plone6 version readme I get:

patterns.depends: Invalid condition: Expected comparison operator or whitespace but ":" found.

and the field is always visible

buildout.cfg


[buildout]
extends =
    http://dist.plone.org/release/5-latest/versions.cfg

parts =
    instance

versions = versions

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
    Plone
    collective.easyform
    plone.patternslib


[versions]
collective.easyform = 3.2.1

I'm not sure if this is due to an old patternlib version in plone.patternslib ... are you able to test this with the checked out master branch from plone.patternslib?

There was a backported fix for pat-depends in patternslib 2.1.4 (https://github.com/Patternslib/Patterns/releases/tag/2.1.4) and master branch of plone.patternslib is updated to patternslib 2.1.5 ... so a release of plone.patternslib would fix this probably /cc @thet

commented

I'm not sure if this is due to an old patternlib version in plone.patternslib ... are you able to test this with the checked out master branch from plone.patternslib?

Yes, the checked out master branch fixes the problem.

Can I help somehow to document this?
Is it okay to add the needed version of plone.patternslib (>=1.2.2) to the 3.x branch setup.py, even when it is not released yet?

Its better to wait for the release before bumping the version in setup.py here. I ping the release managers again ... see plone/plone.patternslib#60