Support » Fixing WordPress » [Plugin: Contact Form 7] extra ending tag?

  • Hello,

    I’ve looked heavily through the support forums but have been unable to find any resolution. We are seeing a closing </p> tag and believe it is coming from contact form 7. Here is some of the code from a page:

    <td style=”width:75%”>[contact-form-7 id=”107″ title=”Schedule A Demo”]</td>

    and the corresponding HTML output is below. Note that there is NOT an opening <p> tag anywhere so the closing </p> doesn’t match up:

    class=”wpcf7″ id=”wpcf7-f107-p103-o1″><form
    action=”/schedule_a_demo/#wpcf7-f107-p103-o1″ method=”post” class=”wpcf7-form”><div
    style=”display: none;”> <input
    type=”hidden” name=”_wpcf7″ value=”107″ /> <input
    type=”hidden” name=”_wpcf7_version” value=”3.2″ /> <input
    type=”hidden” name=”_wpcf7_unit_tag” value=”wpcf7-f107-p103-o1″ /> <input
    type=”hidden” name=”_wpnonce” value=”35c900bcc5″ /></div><p><div
    class=”wpcf7-response-output wpcf7-display-none”></div>Your Name (required)
    class=”wpcf7-form-control-wrap your-name”><input
    type=”text” name=”your-name” value=”” class=”wpcf7-form-control wpcf7-text wpcf7-validates-as-required” size=”40″ /></span>
    Your Email (required)
    class=”wpcf7-form-control-wrap your-email”><input
    type=”text” name=”your-email” value=”” class=”wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email” size=”40″ /></span>
    Your Phone (required)
    class=”wpcf7-form-control-wrap your-phone”><input
    type=”text” name=”your-phone” value=”” class=”wpcf7-form-control wpcf7-text wpcf7-validates-as-required” size=”40″ /></span>
    Requested Demo Time:
    class=”wpcf7-form-control-wrap radio-794″><span
    class=”wpcf7-form-control wpcf7-radio”><span
    type=”radio” name=”radio-794″ value=”Morning” /> <span
    type=”radio” name=”radio-794″ value=”Afternoon” /> <span
    type=”radio” name=”radio-794″ value=”Evening” /> <span
    type=”submit” value=”Send” class=”wpcf7-form-control wpcf7-submit” /></p></form></div></td>

    Any help you had or thoughts would of course be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • <input
    type="hidden" name="_wpnonce" value="35c900bcc5" /></div><p><div
    class="wpcf7-response-output wpcf7-display-none"></div>Your Name (required)

    You can see the opening <p> above.
    Anyway, to help us understand the problem, can you post your site URL?

    Sorry, I see that now….

    Maybe something isn’t quite right. We are using an html validator at and typing in

    and this error appears:
    Line 168, Column 74: No p element in scope but a p end tag seen.
    …lue=”Send” class=”wpcf7-form-control wpcf7-submit” /></p></form></div></td><td

    Not sure if there is an error with the validator or the html.

    This still exists and only an issue with those who care about code quality. Functionality-wise, not jeopardising to functionality of form.

    <p><div class="wpcf7-response-output wpcf7-display-none"></div></p> does not validate because there is a <div> inside a <p>. According to the HTML standard the <p> element can only contain inline elements like <span> and not block elements like <div>.

    The validator automatically closes the <p> tag when it sees the opening <div>, then finds the closing <p> tag later and calls it invalid.

    It would be nice if the Contact Form 7 plugin developer would fix this so the forms validate.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Contact Form 7] extra ending tag?’ is closed to new replies.