WordPress.org

Ready to get started?Download WordPress

Forums

Grunion Contact Form
Label for attribute and textarea id attribute differ (1 post)

  1. jay_freetailed
    Member
    Posted 1 year ago #

    using latest version (2.3) of the grunion contact form plugin. thanks for all your work. i found that the id of the textarea label does not match the for attribute of its label. i changed my local code to read:

    elseif ( $field['type'] == 'textarea' ) {
    		$r .= "\n<div>\n";
    		$r .= "\t\t<label for='contact-form-comment-".esc_attr($field_id)."' class='".esc_attr($field['type']) . ( contact_form_is_error($field_id) ? ' form-error' : '' ) . "'>" . htmlspecialchars( $field['label'] ) . ( $field['required'] ? '<span>'. __("(required)") . '</span>' : '' ) . "</label>\n";
    		$r .= "\t\t<textarea name='".esc_attr($field_id)."' id='contact-form-comment-".esc_attr($field_id)."' rows='20'>".htmlspecialchars($field_value)."</textarea>\n";
    		$r .= "\t</div>\n";
    	}

    this fixed the mismatched label.

    hope this helps and thanks!

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic