WordPress.org

Ready to get started?Download WordPress

Forums

Modifying how comments are submitted to a topic (3 posts)

  1. aim2live
    Member
    Posted 8 years ago #

    I have looked through the support forum and have not found an
    exact answer to my question, so I am posting here to see if there
    is one.

    What I'm looking to do is modify the comments form (hope I'm using
    the correct terminology) so that when someone posts a comment to
    a topic, they have more fields than just the comment textarea field.

    As an example, let's say the topic was between 3 colors, red, green,
    and blue. So, could I add a combo box to the comments form, so that
    when someone posted a comment as to why they prefer the color red,
    they select it from the combo box and then tab into the comment
    textarea field. They add their text, and then post.

    The end result is the ability for me to search for all posts where
    the color choice is 'red' so that I can see those comments. ???

    Is this possible?

    Thanks in advance,

    Michael

  2. Editing the form to do that is really easy. The form is located in your theme's comments.php file.

    However, where to store that data is another thing. WordPress isn't designed to handle extra data for comments.

    Probably the best solution to do is to get or write a plugin to do this. It could easily add a new field to the comments form and could handle submissions of that feild and store it somewhere.

    I don't know if any plugin like that currently exists though...

  3. schestowitz
    Member
    Posted 8 years ago #

    Somebody has extended the comments section and added numerous fields. I suggest you get the plug-ins and learn from it or use it as a starting point:

    http://bravo5.org/blog/2005/11/17/testing-the-geocomments-plugin/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags