Adding an extra field to the comments
-
I’ve been searching for the same question 3 days ago and can’t find any solution !! did you ?
nope, still searching for a plugin. wordpress hasn’t responded to my idea submission either.
only option is to hack the wordpress comments php file and modify the database to add an extra field, but i suspect i may break something accidentally if i do that… sigh.
well,
here is the solution to what you require.
http://www.ideashower.com/files/scripts/extra-comment-fields.zip
this is plugin which by which you can add as many extra fields in comments form as you want.
and can just retrieve values by appending ‘extra’ to the name provided.
i.e.
echo esc_attr($comment_author);
echo esc_attr($comment_extra_age);Hope it works for you. (works fine for me.)
Aslam Shahid
Yes but where do you write
echo esc_attr($comment_extra_age); ?? I can’t figure that part out….
I tried this plug-in under 2.9.2 and it doesn’t work. No fields are added to the comments table.
I think this is the solution
http://wordpress.org/support/topic/345554
Comment meta, like custom fields
@webtechglobal, not the solution that people are asking for… debateso is asking for extra fields in the comments form not a rating system for comments. it turns out that a lot of people are asking about this, and no one seems to know how…
http://wordpress.org/extend/plugins/hikari-title-comments/
This is what I used for a similar purpose.
You would probably need to modify the code a bit for your needs. After months of searching, this is the only thing I have been able to find that actually works.
thanks badnews… i’m going to try this!
can’t even figure out where to edit the code based on hard to understand directions…
Hey I found it fairly simple to modify… what exactly are you having a hard time with?
Isn’t this supposed to be easy now that wordpress has comment meta in the database and correspondent hooks?
so – has anyone figured out how to get comment extra fields to work?
I just want to add one extra field that is displayed in admin (and the admin email) before being approved.
I’ve tried so many solutions and there’s appears to be nothing that will work out of the box.
The extra-comment-fields plugin is broken.
Yes, I would like to be able to add a custom comment field too. Have looked at so many forum posts but no real answer.
I simply want to have a comment form like this:
Name: Joe Bloggs
Email: jbloggs@bloggs.com
Parent: Yes or NoI don’t even need the website field. Any ideas, anyone?
- The topic ‘Adding an extra field to the comments’ is closed to new replies.
(@debateso)
14 years, 4 months ago
I’m looking for a tutorial or a plugin that will add an extra field to the comments page. For example, the current comments form after every post looks like this:
Name __________
Email ___________
Website _________
Comments _________
I would like to add extra/custom fields to make the comments form look like this:
Name _____________
Email _____________
Website ______________
Country _____________
Age ______________
Comments ________________
This would then be stored in the database and displayed after the comment is submitted.
Could somebody point me in the right direction please? Thanks!