Initial values in comments
-
I’m trying to make is so some initial text shows up in the comment boxes if the visitor has not been to the sight yet.
I tried the code below in the comments.php file, but it didn’t work. I don’t know too much about php, I could be going about it wrong.
Any ideas?
Thanks, Nathan
<?php if ( $comment_author ) : ?> <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" /> <?php else : ?> <input type="text" name="author" id="author" class="textarea" value="John Doe" size="28" tabindex="1" /> <?php endif; ?>
- The topic ‘Initial values in comments’ is closed to new replies.