Hi @sdnazdi,
I hope you are doing well today!
We have an update from our developers. You can use the following code snippet as mu-plugin.
<?php
add_action( 'wp_footer', 'wpmudev_checkbox_selection_custom', 9999 );
function wpmudev_checkbox_selection_custom() {
global $post;
if ( is_a( $post, 'WP_Post' ) && !has_shortcode( $post->post_content, 'forminator_form' ) ) {
return;
}
?>
<script type="text/javascript">
jQuery( document ).ready( function($){
setTimeout(function() {
$('.forminator-custom-form').trigger('after.load.forminator');
},100);
$(document).on('after.load.forminator', function(event, form_id) {
if ( event.target.id = 'forminator-module-6' ) {
$('#checkbox-1 input').on('change', function() {
if ( $(this).val() == 'Select-All' ) { //Please change the checkbox option value
$('#checkbox-1 input').not(this).prop('checked', true);
}
if ( $(this).val() == 'Select-All' && ! $(this).is(':checked') ) { //Please change the checkbox option value
$('#checkbox-1 input').not(this).prop('checked', false);
}
});
}
});
});
</script>
<?php
}
Please create the first checkbox option with the label Select All and change the form ID 6 and checkbox field’s ID #checkbox-1 in the code
You can find more information below on how to use mu-plugins.
https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins
and
https://www.ads-software.com/support/article/must-use-plugins/
It would be better to test this out on your staging/dev environment first before your live site and make sure you have the latest backups.
Kind regards,
Zafer