The wpforms_frontend_output_success action is triggered immediately after the form submission.


(array) Processed form settings/data, prepared to be used later.
(array) Sanitized entry field values/properties.
(int) Entry ID.



More Information

The action fires immediately after the form submits prior to saving the entry and sending the email notification.


For this example, the form will be displayed after the form is submitted and just above the confirmation message but it will also display the values entered in each form field.

 * Action fires immediately after the form submission
 * @link
 * @param array  $form_data Form data and settings.
 * @param array  $fields    Sanitized entry field. values/properties.
 * @param int    $entry_id  Entry ID. 

function wpf_dev_frontend_output_success(  $form_data, $fields, $entry_id ) {
        // Reset the form settings
            $_GET[ 'wpforms_return' ],
            $_POST[ 'wpforms' ][ 'id' ]
        // Uncomment this line out if you want to clear the form field values after submission
        unset( $_POST[ 'wpforms' ][ 'fields' ] );
        // Actually render the form.
        wpforms()->frontend->output( $form_data[ 'id' ] );
add_action( 'wpforms_frontend_output_success', 'wpf_dev_frontend_output_success', 10, 3 );

Reference Articles