• I’m interesting in extending the comments form to capture the following additional user information:

    1. Organization name – input field
    2. Organization type – drop down list

    I’ve searched the forum and found solutions for previous versions of WP, but nothing for WP 3.0.1.

    Can someone provide a bit more insight into this? Point me to a plugin (or code)?

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I went through this process not too long ago, and even posted an updated plugin file for all to use. If you look through my profile here, I’m sure you can find the applicable threads ??

    Thread Starter redone975

    (@redone975)

    Thank you… will take a look.

    Moderator t-p

    (@t-p)

    take a look at this guide by Otto.

    Thread Starter redone975

    (@redone975)

    Thank you, just checked out the guide by Otto, and while I figured out how to display an extra field in the comment form, I don’t know how to finish it off – save the data when the user submits a comment, display the data in the comments, etc.

    I attached the following code to the top of the comments.php file

    function my_fields($fields) {
    	$fields['new'] = '<p class="comment-form-organization"><label for="organization">Organization</label><input id="organization" name="organization" type="text" value="" size="30" /></p>';
    	return $fields;
    }
    add_filter('comment_form_default_fields','my_fields');

    You can see the result at:

    Thread Starter redone975

    (@redone975)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding fields to the comments form?’ is closed to new replies.