Last active
August 1, 2019 12:49
-
-
Save Pebblo/8f7331ef2e418ab1bd0e26716e1eb1d0 to your computer and use it in GitHub Desktop.
An example of how you can use jQuery to check all of EE's "Primary Registrant" questions groups when creating a new event. #EE #eventeditor #jquery
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 | |
add_action( | |
'FHEE__EE_Admin_Page___load_page_dependencies__after_load__espresso_events__create_new', | |
'tw_ee_check_all_checkboxes_for_primary_question_groups_on_create' | |
); | |
function tw_ee_check_all_checkboxes_for_primary_question_groups_on_create() { | |
add_action( | |
'AHEE_event_editor_questions_notice', | |
'tw_ee_custom_checkboxes_for_primary_question_groups' | |
); | |
} | |
function tw_ee_custom_checkboxes_for_primary_question_groups() { | |
echo '<script>jQuery( document ).ready(function($) { | |
$("#espresso_events_Registration_Form_Hooks_Extend_primary_questions_metabox input") | |
.prop( "checked", true ); | |
});</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment