Support » Fixing WordPress » Comments: Name value default issue

  • The Name field for someone posting a comment is pre-populated in Chrome with ‘somebody’, in Firefox with ‘Harry, and in IE with just a blank, which is how I want it.

    Looking at the field via Chrome Inspector it show that the value attribute is pre-populating this field in: <p class=”comment-form-author”><input id=”author” name=”author” type=”text” value=”somebody” size=”30″ tabindex=”1″><label for=”author”>Name</label> </p>

    If I change value=”somebody” to value=”” in Chrome Inspector, it displays without the ‘somebody’.

    How do I make this change permanent in WordPress so thatsomeone posting a comment can just fill in their name in a non-pre-populated field for all browsers?

    Thanks for help or ideas.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Look in your theme files for comments.php, the value should be there.

    Thanks, deepbevel but comments.php is a core Genesis Framework file and is not supposed to be edited under any circumstances, all editing is to be done in the child theme (which has no comments.php file). Additionally, searching the two comments.php files test in Genesis Framework finds no value=”somebody” anywhere in the code. I believe the relevant section is:

    $author = '<p class="comment-form-author">' .
    	          '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30" tabindex="1"' . $aria_req . ' />' .
    	          '<label for="author">' . __( 'Name', 'genesis' ) . '</label> ' .
    	          ( $req ? '<span class="required">*</span>' : '' ) .
    	          '</p><!-- #form-section-author .form-section -->';

    Here’s what it looks like on my site:
    Scroll down to immediately below: “What Do You Think? – The World Wants to Hear From You!”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comments: Name value default issue’ is closed to new replies.