Contact Form DB
no repeated values (5 posts)

  1. Francesco
    Posted 2 years ago #


    I need to avoid repeated insertions from the users. For example, if the email field is repeated I want to display a warning... is it possible?


  2. Michael Simpson
    Plugin Author

    Posted 2 years ago #

  3. Francesco
    Posted 2 years ago #

    very well but... I've seen the html code of the page that contains my custom form and I must say that CF7 doesn't print the name of the form.

    To make it possible I edited classes.php (present in wp-content/plugins/contact-form-7/includes) in this way:

    $form .= '<form action="' . esc_url_raw( $url ) . '" method="post"'. ' class="' . esc_attr( $class ) . '"' . $enctype . ' name="'.$this->id.'">' . "\n";

    and after I added the code present here http://cfdbplugin.com/?page_id=904 at the bottom of my theme's functions.php but for some reason it doesn't works. I'm wondering if someone have used it with the responsive theme

  4. Michael Simpson
    Plugin Author

    Posted 2 years ago #

    I don't understand your concern about CF7 printing the form name in the HTML, and why you need to edit CF7 code. The method described should work without it.

    And don't be confused, when you hit submit, the form is not submitted (along with its form name) right away. AJAX calls are made to the back end to validate the input fields (without the associated form name) which is what we are hooking into.

  5. Francesco
    Posted 2 years ago #

    yes, I realized that the problem is not related to the html code, you answered a few seconds before I wrote this:


    I've also tried to use the value of the field form_name of my wp_cf7dbplugin_submits table but the warning still not works

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form DB
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic