Support » Plugin: Contact Form 7 Database + | CFDB+ » Prevent duplicate email submission

  • Resolved l4gen


    Hi everyone
    I’m giving a try to contactic plugin. Since it’is a fork from CFDB plugin I was wondering if it’s possible to prevent duplicate email submission as from
    I modified this 2 lines

    require_once(ABSPATH . ‘wp-content/plugins/contact-form-7-to-database-extension/CFDBFormIterator.php’);
    $exp = new CFDBFormIterator();

    but without any success.
    On submission this creates one loop.
    Can anyone point me in the right direction?
    Thank you in advance

    • This topic was modified 1 year, 7 months ago by l4gen.
    • This topic was modified 1 year, 7 months ago by l4gen.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author contactic


    Hi l4gen,

    The problem you have is actually very interesting since it could become a feature. The code you are trying to implement can’t actually work since we also changed filenames (to prevent colision). Here are the correct paths to use in your code:

    require_once(ABSPATH . ‘wp-content/plugins/contactic/CTC_FormIterator.php’);
    $exp = new CTC_FormIterator();

    Hi Contactic
    the solution you wrote is exactly the one I tried.
    I’ll give it another chance, maybe I mistyped anything.
    Thank you so much

    I contactic
    I’ve tried again but still goes on loop.
    Thank You

    Plugin Author contactic


    Got it. Can you please paste here the exact code you are trying to run ?

    Hi contactic, here it is…hope it helps.
    Thank you
    The code before the one that I attached before is the same from except than this 2 line tha I adapted to my form.
    Please also note that the code from CFDB for prevent double submission is full working.

    $formName = ‘*’; // Change to name of the form containing this field
    $fieldName = ‘tua-email’; // Change to your form’s unique field name

    /* modified CFDB*/
    function is_already_submitted($formName, $fieldName, $fieldValue) {
    require_once(ABSPATH . ‘wp-content/plugins/contactic/CTC_FormIterator.php’);
    $exp = new CTC_FormIterator();
    $exp = new CTC_FormIterator();
    $atts = array();
    $atts[‘show’] = $fieldName;
    $atts[‘filter’] = “$fieldName=$fieldValue”;
    $atts[‘unbuffered’] = ‘true’;
    $exp->export($formName, $atts);
    $found = false;
    while ($row = $exp->nextRow()) {
    $found = true;
    return $found;

    Plugin Author francois86


    thank you very much, it helps, we found an error on our side, we will release 1.3.0 later today, and it should work fine (tested here with success).


    Plugin Author francois86


    1.3.1 is now available, I mark this as resolved please let us know if you have any other question or problem.

    Hello francois86
    Thank you so much. I’ll test it asap and I’ll keep you in touch.

    Hi @l4gen!

    Did you find a solution for duplicated email submissions?

    Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Prevent duplicate email submission’ is closed to new replies.