A variable in the url and the except rule which doesn't work
Hello! I have a variable which is set for being included in the Url via the $queryString array.
Everything works fine, but! If I load a page with some variable in the Url and then make it in null, it still persists in the url. I want to say that the except rule doesn't work in this scenario. A bit of code:
If I load a page with this variable like so /products?inStock=1 and then uncheck the checkbox for unsetting the inStock variable, it still persists in the url like so `/products?inStock='.
I'd like the variable to disappear from the Url.
Could somebody give me a clue?
@brand3000 Hi, it’s a front concern, isn’t it? You can use a javascript function to remove the query string (or the corresponding parameter) when the user uncheck the checkbox…
On unchecked call a function like this (replace 'parameter' withe the name of yours):
@Amaury As I described, everything works as intended if the URL doesn't have any variable in GET. The problem happens if the URL has a variable upon loading the page. This makes me confused. =(