In the comment form field (core comment module) I would to leave the comment author name empty, in order to encourage commentators to come up with original epithets.
What's the easiest way to do it?
I see a few of ways this could be done:
I would probably opt for option 1 as this provides greater flexibility in altering the forms to suit other requirements in the future
Allows you to hook in to and alter any form, including setting the default text to empty. Here's some more help on what the valid elements are:
Best way to start is to determine the form ID by creating a
mymodule_form_alter() function and printing out the
if to make sure you only act on that form and then alter the array to remove the default value you don't want.
Look at pretty much any module for an example implementation. Many modules use this hook. I can't think of any specific example off the top of my head, but there are loads.
EDIT: Here's a good Lullabot blog post on the matter... there's not much different between Drupal 6 and Drupal 7 in this regard, AFAIK: http://www.lullabot.com/articles/modifying-forms-drupal-5-and-6
Just a note for those who decide to go with a custom module, but get Anonymous in the Name input box for no apparent reason, and their
hook_form_comment_form_alter) is okay.
Make sure to remove the
comment_info_name cookie, which the
It's all covered in one place here: http://jan.tomka.name/blog/how-remove-anonymous-name-comment-form