WordPress.org

Support

Support » Themes and Templates » Autofill custom input field in comment form

Autofill custom input field in comment form

  • Cristi Mirt

    @cristi-mirt

    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?

  • The topic ‘Autofill custom input field in comment form’ is closed to new replies.