• Resolved amit.erandole

    (@amiterandole)


    I have added a twitter field to my comment form using the new comments_default_fields hook. The problem is I don’t know how to collect this data back through my admin screen. I don’t even know if its being passed via the comment form.

    function connect_add_twitter_field($fields) {
    	   $fields['twitter'] = '<p class="comment-form-twitter"><label>Your Twitter Username</label>'.
    				'<input id="twitter" type="text" name="twitter" value="@"  /></p>';
    	   return $fields;
    	}
    	add_filter('comment_form_default_fields','connect_add_twitter_field');

    The problem lies in the value field – I tried concatenating it with $_SESSION[‘comment’] but that doesn’t work.

    Can someone please help a newbie?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add a new twitter profile field to my comment form’ is closed to new replies.