• Hello,
    I’m experiencing an issue with the Contact Form Entries plugin. When a Contact Form 7 submission fails or encounters an error, the data is still being recorded in the Contact Form Entries section. However, I only want to store successfully submitted entries, not those with errors or failed submissions.

    Could you please assist me in ensuring that only valid and successfully submitted forms are recorded in the entries?

    Thank you for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • add_action(‘wpcf7_mail_sent’, ‘store_successful_submission_only’);

    function store_successful_submission_only($contact_form) {
    // Here you can add custom checks to see if the submission was successful
    // If successful, record the entry. If not, ignore it.
    if ($contact_form->status === ‘mail_sent’) {
    // Proceed to store the entry
    } else {
    // Ignore failed submission
    }
    }

    Thread Starter aniketispace

    (@aniketispace)

    I need a plugin hook/filter function that checks whether the email was sent successfully. If the email is sent, only then should the form entries be added to the database. The provided hook is for the Contact Form 7 plugin.
    Please share your plugin hook/filter function to validate & insert in database.

    basic purpose of this plugin is to save all form submissions , if there is some issue with email server , this failed submission should be available in database

    You can use filter “vxcf_entries_plugin_before_saving_lead_main” for modifying entry type or change form id , it will Not show entry along other form entries

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.