{% for category in categories %}
+ {% if category in cleaned_filters %} checked {% endif %}>
{% endfor %}
@@ -53,11 +53,11 @@
Filter by Disease Category
@@ -86,22 +86,6 @@
Filter by Disease Category
return encodeURIComponent(joinedFilters);
}
- // Function to load selected filters from localStorage on page load
- function loadSelectedFilters() {
- const selectedFilters = JSON.parse(localStorage.getItem('selectedFilters'));
- if (selectedFilters) {
- selectedFilters.forEach((filter) => {
- const category = filter.replace('category_string:==:', '');
- const checkbox = document.getElementById(category);
- if (checkbox) {
- checkbox.checked = true;
- }
- });
- }
- }
-
- // Call the function to load selected filters on page load
- document.addEventListener('DOMContentLoaded', loadSelectedFilters);
// Function to handle form submission
function handleSubmit(event) {