• In addition to the Name,Email,Website, I would like to be able to add additional fields the commenter can fill in. That information, like the other items, should also be stored in the comments table.

    I have searched for a plugin, but none seems to exist for WorPress 2.8.x version. I would even do a manual mod, if I knew what files/tables to modify.

Viewing 3 replies - 1 through 3 (of 3 total)
  • First a start you’ll want to modify the wp_comments table.

    You’ll need to modify the function wp_new_comment in /wp-includes/comment.php and:

    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');
    
    $comment_id = wp_new_comment( $commentdata );

    in /wp-comments-post.php.

    Thread Starter voiprev

    (@voiprev)

    Ok, I did that.

    Just as a heads-up, look at the coming version 2.9 and consider using that as it has a commentsmeta table that won’t require changes to tables.

    And there’s bound to be, if not already, plugins that provide extra comment fields.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Additional Items To Comment Form’ is closed to new replies.