• Resolved Setsuna.16

    (@setsuna16)


    Hi there, I’m trying to use the action hook wpforms_frontend_output_success but even in the simplest code it doesn’t work. I’ve deactivated our caching plugin if that would rule out the issue but it seems that the plugin itself isn’t working or maybe I’m doing something that’s nor right. See the code I’m testing below:

    // Add the action hook to display success message
    add_action( 'wpforms_frontend_output_success', 'custom_wpforms_frontend_output_success', 10, 4 );
    
    // Function to display success message
    function custom_wpforms_frontend_output_success( $form_data, $fields, $entry_id  ) {
        // Check if the form ID matches the desired form ID
        if ( absint( $form_data[ 'id' ] ) !== 14781 ) {
          return;
        }
        ?>
        <div>Success Na!</div>
    <?php
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Setsuna.16

    (@setsuna16)

    To the author of this plugin or whomever will write an answer, I was able to work out the code above. Is there a way to submit these values when AJAX is enabled on the form?

    Thanks!

    Hey @setsuna16 – Thanks for contacting us!

    For the snippet to work, you’ll need to disable the AJAX form submissions, though I can take this as a feature request and place on the radar of the developers radar.

    In the meantime, if you have any questions, please feel free to reachout.

    Kindly,

    Hey @setsuna16 – We haven’t heard back from you since my previous message, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wpforms_frontend_output_success not working’ is closed to new replies.