- Add the code to your custom functions plugin.
- Find the question group ID for the question group that you want to always have checked for the Additional Registrants
- Change the 1 in the above code to match your question group ID
Forked from joshfeck/my_custom_checkboxes_for_primary_question_groups.php
Last active
January 8, 2024 23:49
-
-
Save Pebblo/8ac8fe9b1e7303dec003793dbeb1d021 to your computer and use it in GitHub Desktop.
Check a question group box by default. For the Event Espresso 4 event editor. Additional Question group ID 1 (Personal Information).
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, except of course if you're starting with a blank file | |
add_action( 'AHEE_event_editor_questions_notice', 'my_custom_checkboxes_for_additional_question_groups' ); | |
function my_custom_checkboxes_for_additional_question_groups() { | |
echo '<script>jQuery( | |
"#espresso_events_Registration_Form_Hooks_Extend_additional_questions_metabox input[value=\'1\']" | |
) | |
.prop( "checked", true );</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment