WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
no repeated values (5 posts)

  1. Francesco
    Member
    Posted 1 year ago #

    Hi,

    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?

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

  2. Michael Simpson
    Member
    Plugin Author

    Posted 1 year ago #

  3. Francesco
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

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

    [up]

    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

About this Topic