Skip to content

Instantly share code, notes, and snippets.

Created January 21, 2023 18:01
What would you like to do?
Shows how to control which Participants Database fields are availble for editing based on the user's approval status
* when the user opens their record for editing, we check on their approval status
* and then select the shortcode to use based on that.
switch ( $this->participant_values['approved'] ) {
case 'yes' :
echo do_shortcode( '[pdb_record]' );
case 'no':
case null:
echo do_shortcode( '[pdb_record groups=main]' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment