I can find a lot of code for a "select all" option, but what I want is more straightforward. I want the WpForms checkboxes all checked by default on page load, not when a button is pressed. I want them all selected so users only have to de-select the few they don’t want.
I am trying to use this code currently, please help.
$(':checkbox').each(function() {
this.checked = true;
});
Thanks for any help. I posted the above code into a javascript wordpress plugin but it didn’t help.
3
Answers
on HTML just add
checked
as attribute forinput type="checkbox"
First of all my friend, you are not a retard ! You just need to gain more experience 😉
You should get checkboxes like this in Jquery and check them all:
This might help you.
About that wordpress plugin that you mentioned I have to say that you should put this piece of code in a script tag and a html file which has the checkBoxes in it.
you can use jquery for this solution
$(document).ready || use for apply any function on load page
Solution: