Open Toutouwai opened 4 months ago
I think Inputfield::collapsedHidden should also be allowed for FieldtypeFieldsetOpen, as this also seems to work fine and it's a useful option.
If I recall correctly, these options were removed because they can work in most cases, but not in all cases. So only the visibility options that are guaranteed to always work are shown. If you'd like, I could make the others available in config.advanced mode though, where this type of inconsistency is more expected.
If I recall correctly, these options were removed because they can work in most cases, but not in all cases.
The options were removed in this commit, which doesn't seem to be in response to a bug report.
Perhaps the impact on fieldsets from changes to InputfieldWrapper was just an oversight, as some functionality was previously restored in response to another issue: https://github.com/processwire/processwire-issues/issues/1603
In my testing the visibility settings mentioned above seem to work without issues so it would be good to have them available without having to enable advanced mode.
Short description of the issue
In earlier versions of PW the full range of options were available for the Visibility > Presentation setting for FieldtypeFieldsetOpen fields.
The screenshot below is from PW 3.0.118
At some point many of these options were removed from InputfieldWrapper, which InputfieldFieldsetOpen extends.
But the four options relating to blank/populated are useful and they seem to work fine with FieldtypeFieldsetOpen. If I restore those options with the hook below...
...then the fieldset can be automatically collapsed or not based on whether the child fields are populated.
Seeing as this works, was the removal for FieldtypeFieldsetOpen unintended? Can support for these visibility settings be added back please?
Setup/Environment