Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
gmw form submission conditional
// if form ID 1 submitted show results
// change the value 1 to the ID of your form
if ( !empty( $_GET['action'] ) && $_GET['action'] == 'gmw_post' && !empty( $_GET['gmw_form'] ) && $_GET['gmw_form'] == 1 ) {
echo do_shortcode( '[gmw form="results"]' );
// otherwise, show content.
} else {
echo 'some content';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment