• Resolved tkruse

    (@tkruse)


    hello together,

    i′ve seen a solution here for a static adress of the form id.

    in my case i′m using on two posts 2 different forms.
    in each post each user should be able to fill out and send the form once.

    to solve this i would like to add a variable which reads the id of the actual form and then replace this to the code

    $formName = 'email_form'; // Name of the form containing this field

    but how i can get this working? i′ve tried this:
    $formName = $cf7->id; // Name of the form containing this field
    but no chance…

    would be great if you could help me to figure it out !!

    thx & cheers, tom

    https://www.ads-software.com/plugins/contact-form-7-to-database-extension/

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

    (@msimpson)

    It is hard to read your code when you don’t enclose in a “code” tag.

    I suggest start with the basic CF7 example and code it to always fail with your error message. Once you get that to show your error, then add in the code from the CFDB example.

    I gave up trying to accomplish this, and then deleted the Shortcodes Actions and Filters plugin. My form is still failing to submit. Do you know why this would be happening and how I can fix it? Do I need to delete anything else?

    Any ideas, Michael?

    Plugin Author Michael Simpson

    (@msimpson)

    I re-created my own example based on https://cfdbplugin.com/?page_id=904 and it works.
    I tweaked the code a little bit & updated it on that page. You should refresh your code. In particular, take out the line
    $tag = new WPCF7_Shortcode( $tag );
    which is not needed and actually causes and error in your code.

    If CF7 is failing to send a message, then disable CFDB and SC, Actions & Filters plugins. Try it again. If you still get an error, then this is a CF7 problem. See https://kb.cf7skins.com/contact-form-7-email-issues/

    Thanks a lot for your help, Michael. The problem didn’t go away after deactivating CFDB and the other plugin. I went through the suggested fixes with CF7 and none of them worked. Ultimately the only fix was remaking the contact form. After doing that, I tried again to activate the two plugins and follow your example in the link you provided, but then the problem with the form submission came back. So I recreated the form a second time and left it like that so it would continue to submit.

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Preventing Duplicate Submissions’ is closed to new replies.