• Hello!
    I’ve tried various things, but I just can’t get it to work.
    In the comment form only (user)name and e-mail are required by default, right? Website is not.
    The way I set it up, it always displays “http://website” if somebody doesn’t click onto the webiste input field to clear it.

    Here’s my code in the comment.php:

    <p><input type="text" name="author" id="author"  value="Name" onfocus="this.value=''; this.onfocus=null;"size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /> <font color="red">*</font></p>
    
    <p><input type="text" name="email" id="email" value="Mail (will not be published)" onfocus="this.value=''; this.onfocus=null;" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /> <font color="red">*</font></p> 
    
    <p><input type="text" name="url" id="url" value="Website" onfocus="this.value=''; this.onfocus=null;" size="22" tabindex="3" <?php if ($req) echo "aria-required='false'"; ?> />
    </p>

    And that’s what I already tried, but it didn’t work:

    add_filter('pre_comment_author_url', 'filter_comment_url');
    function filter_comment_url($url){
        if ($url == "Website" || $url == "http://Website"){
            $url = '';
        }
        return $url;
    }

    Any other suggestions?
    Thanks a lot in advance.

  • The topic ‘commentform: Issue: "http://website"’ is closed to new replies.