Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8492571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:45:21+00:00 2026-06-10T22:45:21+00:00

I am trying to modify the fields on my WordPress comment form using the

  • 0

I am trying to modify the fields on my WordPress comment form using the following code:

<?php $fields =  array(
    'comment_notes_after' => '',
    'title_reply'=>'Let me know what you think',
    'author' => '<p class="comment-form-author">' . '<input class="text" id="author" name="author" type="text" value="Name *" size="30" onfocus="if(this.value==\'Name *\') this.value=\'\';this.style.color=\'#FFF\';" onblur="if(this.value==\'\') this.value=\'Name *\';this.style.color=\'#00AEEF\';"' . $aria_req . ' /></p>',
    'email'  => '<p class="comment-form-email">' .           '<input id="email" name="email" type="text" value="Email *" size="30" onfocus="if(this.value==\'Email *\') this.value=\'\';this.style.color=\'#FFF\';" onblur="if(this.value==\'\') this.value=\'Email *\';this.style.color=\'#00AEEF\';"' . $aria_req . ' /></p>',
    'url'   => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>',
    'comment_field' => '<p class="comment-form-comment"><!--<label for="comment">' . _x( 'Comment', 'noun' ) . '</label>--><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true" onfocus="if(this.value==\'Comment\') this.value=\'\';this.style.color=\'#FFF\';" onblur="if(this.value==\'\') this.value=\'Comment\'" ' . $aria_req . '>Comment</textarea></p>',   
); 

comment_form($fields);
?>

The problem I am having is that the author, email and url fields are not responding to my changes. The comment textarea responds, but even if I put ridiculous test values in the 3 problematic fields it ignores it completely.

Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:45:22+00:00Added an answer on June 10, 2026 at 10:45 pm

    You should take a look at codex : http://codex.wordpress.org/Function_Reference/comment_form

    You will see that there are no author, email and url params, you have to use fields param :

    $args = array (
      'fields' => array(
        'author' => ...
        'email' => ...
        'url' => ...
      ),
      ...
    );
    comment_form($args);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write code for registration form which have the following fields.
I'm trying to modify the credit card form to add some new custom fields
I have a php form and also the css code. I am trying to
I am trying to modify the code below to check the input from a
I'm trying to have an AHAH-enabled form with WYSIWYG fields in Drupal 6. Problem
I am trying to modify an existing PDF with iText. My code currently edits
I'm trying to make a dynamic PDF form using Adobe LiveCycle designer and have
I am trying to modify an Integer field on existing table from nullable to
I'm trying to modify this: jquery desktop by adding a input field inside one
I'm trying to modify an svg tag with javascript to make it resizable, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.