WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Contact Form 7] Checkboxes not selecting properly because of surrounding label tag (2 posts)

  1. Luke Rumley
    Member
    Posted 4 years ago #

    I am working on a contact form (http://fsl.steelcase.com/help/contact-us/) and the checkboxes are acting strangely. Because there is a <label> tag around the entire checkbox section, clicking the 4th checkbox selects the first checkbox, then selecting another unchecks it and so on (at least in Firefox 3.5.5)

    I can dig in and change the HTML that the plugin generates, but it would be nice to know if there is another workaround so I can continue to upgrade it from the developer.

    The HTML code that is kicked out looks like this:

    <p>
    <label>Type of Quesion or Issue (choose all that apply)<br />
        <span class="wpcf7-form-control-wrap IssueType">
        	<span id="issue_type" class="wpcf7-checkbox">
        		<span class="wpcf7-list-item">
        			<input type="checkbox" name="IssueType[]" value="Installation Trouble" />&nbsp;
        			<span class="wpcf7-list-item-label">Installation Trouble</span>
        		</span>
        		<span class="wpcf7-list-item">
        			<input type="checkbox" name="IssueType[]" value="Software Error" />&nbsp;
        			<span class="wpcf7-list-item-label">Software Error</span>
        		</span>
        		<span class="wpcf7-list-item">
        			<input type="checkbox" name="IssueType[]" value="Graphic Drawn Incorrectly" />&nbsp;
        			<span class="wpcf7-list-item-label">Graphic Drawn Incorrectly</span>
        		</span>
        		<span class="wpcf7-list-item">
        			<input type="checkbox" name="IssueType[]" value="Graphic Missing" />&nbsp;
        			<span class="wpcf7-list-item-label">Graphic Missing</span>
        		</span>
        		<span class="wpcf7-list-item">
        			<input type="checkbox" name="IssueType[]" value="Feature Request" />&nbsp;
        			<span class="wpcf7-list-item-label">Feature Request</span>
        		</span>
        		<span class="wpcf7-list-item">
        			<input type="checkbox" name="IssueType[]" value="Need a Vacation" />&nbsp;
        			<span class="wpcf7-list-item-label">Need a Vacation</span>
        		</span>
        	</span>
        </span>
    </label>
    </p>

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

  2. Luke Rumley
    Member
    Posted 4 years ago #

    Figured it out - I am dumb. It was in my HTML template area.

    <p><label>Type of Quesion or Issue (choose all that apply)<br /> [checkbox IssueType id:issue_type "Installation Trouble" "Software Error" "Graphic Drawn Incorrectly" "Graphic Missing" "Feature Request" "Need a Vacation"]</label></p>

    changed to:

    <p>Type of Quesion or Issue (choose all that apply)<br /> [checkbox IssueType id:issue_type "Installation Trouble" "Software Error" "Graphic Drawn Incorrectly" "Graphic Missing" "Feature Request" "Need a Vacation"]</p>

    Lesson learned: don't copy and paste the textbox field to create a checkbox field. Dummy.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.