Created
April 25, 2017 22:22
-
-
Save joshfeck/a70a2ae57e763047b70cafbdd4f61624 to your computer and use it in GitHub Desktop.
When creating an event this sets the “Personal Information” question group checkbox checked by default for the “Questions for Additional Registrants” section, so that the administrator won’t forget to tick the box.
This file contains hidden or 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( | |
'FHEE__EE_Admin_Page___load_page_dependencies__after_load__espresso_events__create_new', | |
'ee_custom_checkboxes_for_additional_question_groups_hook' | |
); | |
function ee_custom_checkboxes_for_additional_question_groups_hook() { | |
add_action( | |
'AHEE_event_editor_questions_notice', | |
'ee_custom_checkboxes_for_additional_question_groups' | |
); | |
} | |
function ee_custom_checkboxes_for_additional_question_groups() { | |
echo '<script>jQuery( document ).ready(function($) { | |
$("#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