Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Check a question group box by default. For the Event Espresso 4 event editor. Primary Question group ID 3.
//* 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>';

Usage instructions

  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.