Save Checked Checkboxes When Page Reloads
For my search-engine I designed a filter using a form with checkboxes. When submitting those, the filter function works fine (using Flask for this). Yet the checkboxes which where
Solution 1:
Just add checked
to it
<input class="form-check-input" type="checkbox" name="doctype" value="offer" id="offer" checked>
Solution 2:
Use checked in your checkbox and read here
<form>
<article class="card-group-item">
<header class="card-header">
<span class="title">Document Types </span>
</header>
<div class="filter-content">
<div class="card-body">
<label class="form-check" >
<input class="form-check-input" type="checkbox" name="doctype" value="offer" id="offer" checked>
<span class="form-check-label">Offer</span>
</label> <!-- form-check.// -->
<button type="submit" class="btn btn-secondary btn-sm">Submit</button>
</div> <!-- card-body.// -->
</div>
</article> <!-- card-group-item.// -->
</form>
Post a Comment for "Save Checked Checkboxes When Page Reloads"