Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Have a look at this example: https://cfdbplugin.com/?page_id=904

    Thread Starter kayshah

    (@kayshah)

    I looked in to this but I am not sure how to implement this can you help me how to implement along with this code and where should I place this code

    if (is_user_logged_in()) {
    $current_user = wp_get_current_user(); // WP_User object
    $user = $current_user->user_login;
    $atts[‘filter’] = “$fieldName=$fieldValue&&Submitted Login=$user”;
    }

    Plugin Author Michael Simpson

    (@msimpson)

    I think all you need to do is change this line:

    $fieldName = 'email_123'; // Change to your form's unique field name

    to:

    $fieldName = 'Submitted Login'; // Change to your form's unique field name

    But beware that this check will apply to all of your forms, due to the limitation in CF7 (where the field validation doesn’t tell you want form it is associated with)

    Thread Starter kayshah

    (@kayshah)

    Thanks Michael for your prompt reply,

    in which file I should Implement this code?

    Plugin Author Michael Simpson

    (@msimpson)

    Follow the directions in the example

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘prevent duplicate form submission by user in Contact form 7’ is closed to new replies.