This is the code I am using right now, for cf7 wordpress, but when I load the page it is checking it but after fully load of page it is going to uncheck again.
I just want to get the checkbox checked by default.
Here is the code,
jQuery(document).ready(function ($) {
$('#cus_checkbox').find('input').prop( 'checked', true );
});
Any help on this?
2
Answers
Actually, my reputation is not enough for comment so I am writing as an answer
try by doing this
In order to have a "registered" answer here I repeat my comment again as an answer:
In order to get the contactform 7 checkbox checked by default you should specify it when you define the cf7 element by adding
default:1
: