Views: 106
How to use (gform_review_page) filter.
You can apply the review page filter for all your Gravity forms or for a specific form. Paste the below code in the child theme’s function.php file. OR use Code Snippets by Code Snippets Pro
Apply filter on all the active 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;
}
Apply filter on a particular form.
add_filter( 'gform_review_page_FORMID', '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;
}
Source : https://wpmonks.com/blog/how-to-show-a-pre-submission-confirmation-page-with-all-the-filled-form-information-to-users/