Support

Home Forums Event Espresso Premium Send Related Messages set globally to Yes

Send Related Messages set globally to Yes

Posted: September 11, 2017 at 11:07 am

Viewing 3 reply threads


LindenwoodUniv

September 11, 2017 at 11:07 am

Is there a setting where I can set the “Send Related Messages” to yes system wide?


Josh

  • Support Staff

September 11, 2017 at 11:19 am

Hi LindenwoodUniv,

I checked and there isn’t one. If you intended on changing the default to Yes, then it may be possible to add some jQuery to the page to change the selection from No to Yes when the document is ready.


LindenwoodUniv

September 11, 2017 at 12:22 pm

Found this snippit. Worked out perfect.

<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
// change default for "Send Related Messages" to Yes on when changing the registration status
function tw_ee_reg_status_change_form_send_notifications_default( $options, $form ) {
	if( $form instanceof EE_Form_Section_Proper 
		&& isset( $options[ 'name' ] ) 
		&& $options[ 'name' ] === 'reg_status_change_form' 
	) {
		$send_notifications_input = $options[ 'subsections' ][ 'send_notifications' ];
		if( $send_notifications_input instanceof EE_Yes_No_Input ) {
			$send_notifications_input->set_default( TRUE );
		}
	}
	return $options;
}
add_filter( 'FHEE__EE_Form_Section_Proper___construct__options_array', 'tw_ee_reg_status_change_form_send_notifications_default', 10, 2 );
  • This reply was modified 7 years, 1 month ago by Tony. Reason: Code formatting


Tony

  • Support Staff

September 11, 2017 at 1:52 pm

Hi there,

Just to note for future readers, that snippet is from our code snippet library here:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/admin/tw_ee_reg_status_change_form_send_notifications_default.php

Viewing 3 reply threads

The support post ‘Send Related Messages set globally to Yes’ 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