- Issue created by @chrisolof
- πΊπΈUnited States chrisolof
chrisolof β changed the visibility of the branch 3509467-add-option-to to hidden.
- Merge request !14Add option to remove (instead of hide) unnecessary filters β (Open) created by chrisolof
- π¨πΏCzech Republic rob.sipek@gmail.com
Hi Chris, I really appreciate the changes you've made to the module.
I would also prefer to remove unused form fields from the html code instead of just hiding them in cascading styles.
But I've found an issue: if I split a form into two blocks and set it to remove unused fields instead of just to visually hiding them, then changing the state of one form (e.g. ticking the checkbox) will clear the previous state of the second form (e.g. filled input). - π³πΏNew Zealand dieuwe Auckland, NZ
Not sure how feasible it is to merge multiple form states behind the scenes.
I would put that down as a bit of a blocker to have the module fully support this feature, although the patch as it stands is very useful for some particular use cases.
- πΊπΈUnited States chrisolof
@rob.sipek, it sounds like for your use-case you'd need to stick with the default, "Visually hide" filter removal strategy so that current filter values are maintained regardless of which block's form is submitted. In your use-case that hidden markup is necessary as it makes that behavior possible.
In some of my use-cases I do not need or want the hidden filters' current selections maintained, so the "Remove" strategy is a better fit (for example I have a search box that always initiates a fresh search - current deeper filtering choices are totally unnecessary and not desired in that block).
Maybe a little help text under the 'Filter removal strategy' field and options would make it easier for users to determine which strategy is right for their needs. Example:
Filter removal strategy
- Visually hide
Allows for current selections/values in hidden filters to be maintained through submit.
- Remove
Less markup, but only values from the visible filters in the form are submitted.Keep the default, "Visually hide", if you're unsure or the "Remove" strategy is not working for you.