Support » Plugins » Add custom fields to comment form?

  • Resolved Mysmasken


    Hello! I’ve been looking for something that lets me add fields to my comment form.
    I would like users to review my posts, therefore I would like to add a couple fields like “plus”, “minus”…
    Both radiobuttons and text fields.

    I tried to do it myself, but it’s too complicated.

    Anyone knows if there is such thing?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Anyone?

    try to play with this. It will get you started.

    ‘<form method=”post” name=”somename” action=”getdata.php”>
    <input type=”radio” name=”someName” value=”1″>
    <input type=”radio” name=”someName” value=”2″>
    <input type=”submit” name=”button” value=”Submit”>

    I figured that much out. The problem is when it gets to inputing it into the database…
    Was wondering if someone had seen a plugin or a mod for it…

    will this help U a little…
    ‘if($HTTP_POST_VARS[‘button’] == “Submit”) {
    // form was submitted, since the value of ‘button’ is equal to ‘Submit’
    switch($HTTP_POST_VARS[‘someName’]) {
    case ‘1’:
    // one radio button was selected code goes here
    case ‘2’:
    // two radio button was selected code goes here
    // form was submittted but no radio button was selected code goes here
    } else {
    // form was not submitted

    What I did was I looked everywhere it submitted comment_content and I copied it and did the same for my new field that was called comment_plus and comment_minus.
    But it gave me an erorr.
    Guess I will have to try again. I do understand some PHP, but not nearly enough I guess.

    I figured I have to do changes in wp-commentsrss2.php, wp-comments-post.php maybe in comment-functions.php and also in my themes comment-files.

    Gah. I’ve been looking thru all the posts on this and none of them are solved.

    Apparently there is a big need/want for a plugin like this, so if anyone feels tempted 😉

    I got it to work! Yay 😀

    Would you mind sharing how you did it?


    I could use the answer too.

    Mysmaken, please share.

    Thousands of wordpressers would like to know how this can be done.


    It would probably be more visible if you make your own post announcing it 🙂

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Add custom fields to comment form?’ is closed to new replies.