Closed 1letter closed 1 year ago
This has to do with pat-validation
because the values on the right selector field are not "selected" but its marked as "required" ... if you click them, then the browser validator lets you save. The in/out widget has to be refactored to fix the required issue for pat-validation
I took a closer look at plone.app.z3cform.templates.orderedselect_input.pt
: the <select name="<fieldname>.to">
has the property required but the listed items are not select when you edit your page. This is not a problem because there are <input type="hidden" name="<fieldname>:list" value"xyz" />
which hold your saved value(s) so there's no data loss. But for validating required input it gets tricky... we could remove the required
completely with the downside, that there's no browser validation for orderedselect
widget ... server validation should work as usual.
@petschki i will upgrade the js ressource in z3c.form. "selected=selected" must explicit set on the options, right?
@petschki but in collective.taxonomy, the widget works. and this is not the same but similar to.
@1letter we can set this directly in plone.app.z3cform
without touching z3c.form
JS resources. BTW I never really liked this approach because the JS gets loaded multiple times if you have multiple OrderedSelectWidgets
in a form. IMHO this should be refactored to a helper JS in plone.app.z3cform
(like p.a.event does) or we write a pattern in mockup for this.
@petschki ok, thanks for the hint
What I did:
What I expect to happen:
The page could be saved
What actually happened:
The page could not be saved. Looks like validation error or an override in bootstrap event handling, but i'm not sure.
What version of Plone/ Addons I am using:
up to the version Plone 6.0.5 all is ok
Plone 6.0.6 is broken