samedi 25 septembre 2021

changing default behavior of a checkbox

I am using a plugin on my WordPress that displays a checkbox. When that checkbox is checked then only the "In stock" items are displayed. By default that checkbox is unchecked. I want the check box checked by default. How do I edit the code to make that happen?

Code when the checkbox is unchecked

<input type="checkbox" class="cwpf_checkbox_instock" id="cwpf_checkbox_instock" name="stock" value="0">

Code when the checkbox is checked

<input type="checkbox" class="cwpf_checkbox_instock" id="cwpf_checkbox_instock" name="stock" value="0" checked="checked">

is it possible to modify the code to have the checkbox checked by default?

Thanks




Aucun commentaire:

Enregistrer un commentaire