I have a webiste where users can find a discord server with their option,such as if server is NSFW, premium,member count and tags. I tried to do a dinamic filter using the request query from the form where users filter the servers,but I can't find a solution to send the value of the input checkbox to the form even if the input is unchecked.
<form method="get" action="/search/">
<div class="setting">
<input type="checkbox"
name="premium"
id="uppercase"
value="true"
onClick="if(this.value === 'false') {this.value = true} else {this.value =false}"
checked />
<label for="uppercase">Premium</label>
</div>
</form>
when the input is checked the value is sent to the url, like /search?premium=true, but when the checkbox is unchecked,nothing is sent to the url and this causing me trouble,cause I need those parameters in order to make the filter to work. Is there something that I can do to the send the value of the check input even if it's unchecked?