Mysmasken
Member
Posted 5 years ago #
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?
Mysmasken
Member
Posted 5 years ago #
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">
</form>
'
Mysmasken
Member
Posted 5 years ago #
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
break;
case '2':
// two radio button was selected code goes here
break;
default:
// form was submittted but no radio button was selected code goes here
break;
}
} else {
// form was not submitted
}
'
Mysmasken
Member
Posted 5 years ago #
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 ;)
Mysmasken
Member
Posted 5 years ago #
rsuplido
Member
Posted 5 years ago #
Would you mind sharing how you did it?
Thanks.
ythibodeau
Member
Posted 4 years ago #
I could use the answer too.
ythibodeau
Member
Posted 4 years ago #
Mysmaken, please share.
Thousands of wordpressers would like to know how this can be done.
Please!!
IdeaShower
Member
Posted 4 years ago #
It would probably be more visible if you make your own post announcing it :)