-
-
Save Pebblo/ce01a02c0864f2c57685 to your computer and use it in GitHub Desktop.
This example shows how to identify the different system groups provided from EE_event->question_groups()
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 | |
/** @type EE_Event $event */ | |
$event = EEM_Event::instance()->get_one_by_ID( 1 ); | |
$question_groups = $event->question_groups(); | |
foreach ( $question_groups as $question_group ) { | |
if ( $question_group instanceof EE_Question_Group ) { | |
switch( $question_group->system_group() ) { | |
case EEM_Question_Group::system_personal : | |
// personal question group | |
break; | |
case EEM_Question_Group::system_address : | |
// address question group | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment