<div class="col-3 filters">
<form method="GET" class="filter-form">
<section class="product-filter__categories">
<div class="filters__field">
<input type="checkbox" id="...category" name="category">
<input type="checkbox" id="...category" name="category">
<input type="checkbox" id="...category" name="category">
<input type="checkbox" id="...category" name="category">
</div>
I have a lot of inputs and I need to submit the filter form after a user opened (firstly) the page.
I did that:
document.onload = function() {
form.submit();
}
But after that, form was submited each second.
It happens because after the form submiting, page reloads and window loads again and form'll submited again..
How i can solve that?