Skip to content Skip to sidebar Skip to footer

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

<inputclass="form-check-input"type="checkbox" name="doctype" value="offer"id="offer" checked>

Solution 2:

Use checked in your checkbox and read here

<form><articleclass="card-group-item"><headerclass="card-header"><spanclass="title">Document Types </span></header><divclass="filter-content"><divclass="card-body"><labelclass="form-check" ><inputclass="form-check-input"type="checkbox"name="doctype"value="offer"id="offer"checked><spanclass="form-check-label">Offer</span></label><!-- form-check.// --><buttontype="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"