I searched a lot of thread regarding my problem, but unfortunately I found nothing works, and this my final option. I want to add some custom fields on my comment form. How can I do that?
Here you go: Adding Custom Fields to WordPress Comment Forms?
And another awesome post on this: http://wpengineer.com/2214/adding-input-fields-to-the-comment-form/
Functions are available to add/update, delete comment meta, similar to post and user meta.
Here's an example to give you a start (put the code into the
Add the fields to comment form:
3 functions to retrieve/add/update/delete comment meta:
This is where you'd do the validations:
And save the comment meta:
Retrieve and display comment meta:
(Note: All the code is from the WPengineer link I posted above. There are more details and advanced usages in that post, please check them too! )
This slideshow from Beau Lebens should be able to show you how: Hooking into Comments
And this blog post from Otto should be able to show you more: WordPress 3.0 Theme Tip: The Comment Form
There is also a basic plugin available here called "Wordpress Plugin: Extra Comment Fields" (sorry can't post the link).
protected by toscho♦ Apr 11 at 19:32
This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.