Show Default Form Confirmations on Edit.

Use confirmation message from Form Settings when editing an entry in GPEB.

Instructions

Code

Filename: gpeb-show-default-form-confirmations-on-edit.php

<?php
/**
 * Gravity Perks // Entry Blocks // Show Default Form Confirmations on Edit.
 * https://gravitywiz.com/documentation/gravity-forms-entry-blocks/
 *
 * Use confirmation message from Form Settings when editing an entry in GPEB.
 * 
 * Instruction Video: https://www.loom.com/share/4bdd738bbd0342548807c2dffd93bd73
 */

/**
* @param array $confirmation The edit confirmation.
* @param array $form The current form.
* @param array $entry The entry being edited.
 *
 * @return string
 */
add_filter( 'gpeb_edit_confirmation', function ( $confirmation, $form, $entry ) {

    // Replace with your form ID.
    if ( $form['id'] != 137 ) {
        return $confirmation;
    }

    // Populates the form confirmation property with the confirmation to be used for the current submission.
    $form = GFFormDisplay::update_confirmation( $form, $entry );
    return $form['confirmation'];
}, 10, 3 );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.