You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FieldsetPage uses InputfieldRepeater for its inputfield, but it sets a special $singleMode that affects several things.
Something else that it would be good for $singleMode to do is change the behaviour of InputfieldRepeater::isEmpty().
A normal repeater can have zero items or many items, and so it makes sense that in normal mode isEmpty() will return a value based on the count of the repeater items.
But FieldsetPage always has one item, so InputfieldRepeater::isEmpty() doesn't do anything useful for FieldsetPage - it always returns false. When $singleMode is true it would be better if InputfieldRepeater::isEmpty() returned true when none of the fields within the FieldsetPage are populated and false when any of them are populated.
Short description of the enhancement
FieldsetPage uses InputfieldRepeater for its inputfield, but it sets a special
$singleMode
that affects several things.Something else that it would be good for
$singleMode
to do is change the behaviour ofInputfieldRepeater::isEmpty()
.A normal repeater can have zero items or many items, and so it makes sense that in normal mode isEmpty() will return a value based on the count of the repeater items.
But FieldsetPage always has one item, so
InputfieldRepeater::isEmpty()
doesn't do anything useful for FieldsetPage - it always returns false. When $singleMode is true it would be better ifInputfieldRepeater::isEmpty()
returned true when none of the fields within the FieldsetPage are populated and false when any of them are populated.That would allow the "when blank/populated" visibility settings for the inputfield to work, as they currently don't work for FieldsetPage. Related forum topic: https://processwire.com/talk/topic/22666-visibility-fieldset-page/
The text was updated successfully, but these errors were encountered: