Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Allow the Gravity form to stay on the page when confirmation displays.
- add_filter( 'gform_pre_submission_filter', 'dw_show_confirmation_and_form' );
- function dw_show_confirmation_and_form( $form ) {
- $shortcode = '[gravityform id="' . $form['id'] . '" title="true" description="false"]';
- if ( array_key_exists( 'confirmations', $form ) ) {
- foreach ( $form['confirmations'] as $key => $confirmation ) {
- $form['confirmations'][ $key ]['message'] = $shortcode . '<div class="confirmation-message">' . $form['confirmations'][ $key ]['message'] . '</div>';
- }
- }
- return $form;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement