Last active
March 22, 2021 04:22
-
-
Save xnau/f12c0ca1aa9b9cb499fb40a7aaf2a21b to your computer and use it in GitHub Desktop.
Custom template demonstrating how to show a Participants Database record edit form depending on a value in the record
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 | |
/* | |
* first, check for the value that determines what kind of | |
* record edit form to show | |
*/ | |
$type = $this->participant_values['type']; | |
/* | |
* now, show the record edit form for that type | |
*/ | |
switch ( $type ) { | |
case 'parent': | |
echo do_shortcode('[pdb_record groups="common,coach"]'); | |
break; | |
case 'player': | |
echo do_shortcode('[pdb_record groups="common,player"]'); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment