In form filter make values dynamic
In Lizmap, it is possible to create a filtering form to filter a layer based on the value of a field. When multiple filtering parameters are available, it would be useful to update the proposed values of the others parameters based on the values entered by the user.
For example, imagine a form with a dropdown list for EPCI and another dropdown list for cities. Currently, if I select an EPCI, all cities are listed, even those that do not belong to the selected EPCI. Would it be possible to make the proposed values dynamic by filtering them based on the user's filter selection(s)?
This would indeed be interesting, and would mimic the JS script https://github.com/3liz/lizmap-javascript-scripts/tree/master/library/tools/smartfilter
This would require to rewrite the Lizmap form filter. Note that some work has recently been done for the autocompleted fields: https://github.com/3liz/lizmap-web-client/pull/5045
A demo of the script is available here
Hello, it would indeed be interesting if the second criteria were updated based on the first filter criterion. I also encounter the same constraint.
related to multiple filters for the same layer but not combine them https://github.com/3liz/lizmap-web-client/issues/5366
We also think this would be great. It requires a major rewrite of the filter tool. At present, the only "cascadable" filter fields are the "text" ones with autocompletion, since recent POR: https://github.com/3liz/lizmap-web-client/pull/5045
Une démo du script est disponible ici
I watched the demo, and that's exactly what I want to do; but I've never used javascript with lizmap, I have a question, where do I drop the JS file? and do I also have to change the html structure? I would really like to have as much information as possible regarding the insertion of a js file. also on this demo there is a message when entering the application and then you can click on a button to remove it I also wonder how to do that. Thank you in advance for your time and feedback