WordPress.org

Ready to get started?Download WordPress

Forums

Autofill custom input field in comment form (1 post)

  1. Cristi Mirt
    Member
    Posted 1 year ago #

    Hi. I'm working on a personal theme and I have a custom input field on the comment form for the Twitter username. How can I make the field to autofill when the same commenter comes back to my site?
    In a theme that I personalized a while back, I was using cookies, like this:

    <input name="atf_twitter_id" value="<?php echo $_COOKIE['comment_author_twitter_'.COOKIEHASH]; ?>" id="atf_twitter_id" style='width:427px;'/>

    But that's not working anymore. Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic