• Resolved hefin

    (@hefin)


    The _wpcf7 hidden field value is being incorrectly set to the page ID minus one instead of the Contact Form 7 form ID. However, the _wpcf7_container_post field is correctly set to the page ID. This inconsistency may cause functionality issues as the _wpcf7 field should reflect the Contact Form 7 form ID.

    Steps to Reproduce:

    1. Create a new Contact Form 7 form.
    2. Add the form’s shortcode to a page and save it.
    3. View the page in a browser.
    4. Inspect the source code of the page.
    5. Search for the _wpcf7 hidden field in the form.

    Expected Behavior:
    The _wpcf7 hidden field should have the value of the Contact Form 7 form ID – in my test case’ f7e1d90′.

    Observed Behavior:
    The _wpcf7 hidden field is set to the page ID minus one instead of the Contact Form 7 form ID.
    The _wpcf7_container_post field is correctly set to the page ID.

    When programmatically accessing detail.contactFormId in JavaScript, the value retrieved does not correctly match the actual Contact Form 7 form ID. This discrepancy is causing functionality issues.

    Environment Details:

    • WordPress Version: 6.7.1
    • PHP Version: 8.2.26
    • Contact Form 7 Version: Version 6.0.1
    • Browser: Chrome Latest

    Additional Information:
    This behavior is reproducible across multiple pages and forms. Correcting this issue will ensure that the _wpcf7 field value aligns with the expected Contact Form 7 form ID.

    This behavour is described in https://contactform7.com/dom-events/

    • This topic was modified 3 months ago by hefin.
    • This topic was modified 3 months ago by hefin.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You seem to have a misunderstanding about the contact form ID. A contact form data is a standard custom post of WordPress, so its ID is the post ID (unsigned integer value), cannot be f7e1d90. Don’t confuse the contact form ID with the hash-based identifier.

    Thread Starter hefin

    (@hefin)

    Thank you, Takayuki, for your response. I appreciate the clarification that the contact form ID corresponds to the ID of the form. Apolgises for my misunderstanding.

    • This reply was modified 3 months ago by hefin.
    • This reply was modified 3 months ago by hefin.
    • This reply was modified 3 months ago by hefin.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.