Last active
June 21, 2017 09:09
-
-
Save Pebblo/e67cc5f8fae20e5ae08380f43f5c3b93 to your computer and use it in GitHub Desktop.
A simple example of how to set all EE checkbox questions to have all options checked.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //Please do not include the opening PHP tag if you already have one | |
function ee_set_checkboxes_checked() { | |
wp_add_inline_script( | |
'single_page_checkout', | |
'jQuery( document ).ready(function($) { | |
$( ".ee-reg-qstn:checkbox").prop( "checked", true ); | |
});' | |
); | |
} | |
add_action( 'wp_enqueue_scripts', 'ee_set_checkboxes_checked', 11 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment