Support

Home Forums Event Espresso Premium Enable additional recipient questions by default

Enable additional recipient questions by default

Posted: January 8, 2024 at 8:08 am


edwardkay

January 8, 2024 at 8:08 am

We want to collect personal data for additional registrants on all our events.

Is there a way to have the ‘Personal information’ question group selected by default (under “Questions for Additional Registrants”) when creating new events via WP Admin?

Thanks


Tony

  • Support Staff

January 8, 2024 at 4:49 pm

Hi there,

We don’t have an option within to set the default question groups, but its possible to do so with some JS in a custom function:

https://gist.github.com/Pebblo/8ac8fe9b1e7303dec003793dbeb1d021

Add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

The above should set the Personal Information question group to be enabled by default on the Additional Registrant question groups.


edwardkay

January 9, 2024 at 3:50 am

Perfect, thanks.

FYI I had to wrap the jQuery call in the document.ready() handler. The code supplied ran before the checkbox was rendered, and so didn’t work.

`
echo ‘
<script>
jQuery(document).ready(function($) {
$(“#espresso_events_Registration_Form_Hooks_Extend_additional_questions_metabox input[value=\’1\’]”).prop( “checked”, true );
});
</script>
‘;
`

The support post ‘Enable additional recipient questions by default’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso