- 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 Primary Registrant
- Change the 3 in the above code to match your question group ID
Last active
January 8, 2024 23:44
-
-
Save joshfeck/70ef3d761d1e3bf4228a1e015ff312b6 to your computer and use it in GitHub Desktop.
Check a question group box by default. For the Event Espresso 4 event editor. Primary Question group ID 3.
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_primary_question_groups' ); | |
function my_custom_checkboxes_for_primary_question_groups() { | |
echo '<script>jQuery( | |
"#espresso_events_Registration_Form_Hooks_Extend_primary_questions_metabox input[value=\'3\']" | |
) | |
.prop( "checked", true );</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment