Skip to content

Instantly share code, notes, and snippets.

@wpmonks
Last active January 31, 2019 07:44
Show Gist options
  • Save wpmonks/803981cfe9ab2caff5386668fb07322d to your computer and use it in GitHub Desktop.
Save wpmonks/803981cfe9ab2caff5386668fb07322d to your computer and use it in GitHub Desktop.
Gravity forms before submission review page for all forms
add_filter( 'gform_review_page', 'wpmonks_add_review_page', 10, 3 );
function wpmonks_add_review_page( $review_page, $form, $entry ) {
// Enable the review page
$review_page['is_enabled'] = true;
if ( $entry ) {
// Populate the review page
$review_page['content'] = GFCommon::replace_variables( '{all_fields}', $form, $entry );
}
return $review_page;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment