WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
extra ending tag? (6 posts)

  1. jmbbaker
    Member
    Posted 1 year ago #

    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:

    <td
    style="width:75%"><div
    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)
    <span
    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)
    <span
    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)
    <span
    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:
    <span
    class="wpcf7-form-control-wrap radio-794"><span
    class="wpcf7-form-control wpcf7-radio"><span
    class="wpcf7-list-item"><input
    type="radio" name="radio-794" value="Morning" /> <span
    class="wpcf7-list-item-label">Morning</span></span><span
    class="wpcf7-list-item"><input
    type="radio" name="radio-794" value="Afternoon" /> <span
    class="wpcf7-list-item-label">Afternoon</span></span><span
    class="wpcf7-list-item"><input
    type="radio" name="radio-794" value="Evening" /> <span
    class="wpcf7-list-item-label">Evening</span></span></span></span>
    <input
    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.

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

  2. Krishna
    Volunteer Moderator
    Posted 1 year ago #

    <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?

  3. jmbbaker
    Member
    Posted 1 year ago #

    Sorry, I see that now....

  4. jmbbaker
    Member
    Posted 1 year ago #

    Maybe something isn't quite right. We are using an html validator at http://validator.w3.org/ and typing in http://www.dailydealpros.com/contact_us/

    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.

  5. Khairul
    Member
    Posted 1 year ago #

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

  6. mikedev
    Member
    Posted 1 year ago #

    <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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic