How to remove "Anonymous" name from comment form

I've decided to use Drupal for a totally minimalistic website, which I'm sure I would be able to put together from scratch in just a few days. Anyway, I take it as a good exercise in altering and theming even the tiniest elements of a Drupal system.

I ran into a couple of problems while working on the website, but I spent most time on trying to remove the default value from the comment form Name input box. For such a small modification, a few hour struggle has been long enough to trigger a blog post.

The website itself consists from only three pages:

  1. a home page with an image on it,
  2. a stupid simple photo gallery, for which the Slideshow module was a perfect fit, and
  3. a guestbook -- an empty Story node with comments enabled.

I've been trying to keep it small even theming wise, so I use Zen's STARTERKIT sub-module. Everything was good and fine until I decided to rename Comments to Messages and only require visitor's name and message body to be entered.

I just didn't seem to be able to remove the Anonymous string from the Name input box. I tried a theming function, I tried hook_form_alter() and hook_form_comment_form_alter(), too. I quickly resorted to Google, which only came up with exactly same solutions as I had tried:

function custom_changes_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id != 'comment_form')
    return;
 
  unset($form['comment_filter']['format']);
  unset($form['mail']);
  unset($form['homepage']);
  unset($form['captcha']['#description']);
  unset($form['preview']);
 
  $form['comment_filter']['comment']['#rows'] = 5;
 
  $form['name']['#default_value'] = '';
  $form['name']['#required'] = TRUE;
}

It just didn't seem to work. I went through my code multiple times, I went through the Comment module code and didn't see where the value could be reset after I had cleared it.

Only when I switched off Javascript I realized a once submitted value gets stored in cookie and restored via script. Therefore, most of the solutions out there are correct, and if they don't seem to be working for you, make sure to remove the comment_info_name cookie.

Comments

“Cheap North Face Jackets is

“Cheap North Face Jackets is my love” reflect more and more young people like to wear North Face Jackets. Now North Face Outlet have many North Face Jackets On Sale. This is a good news to it’s fans. But Chicago Bulls Hats is the most amazing. Also Chicago Bulls Snapback Hats is a good choice.

I found the entire Software

I found the entire Software Tailor team to very helpful and knowledgeable.
You help me understand the differences between the other systems on the market
and the Software Tailor system.Please find www.SoftwareTailor.com

As we know, New Era Hats is

As we know, New Era Hats is the most popular hat in the recent years. Whatever NBA player or singer, they love wearing New Era Snapback Hats. Why they love Cheap New Era Hats? The reason is that New Era Hats Wholesale have high quality and low price. So it make people crazy!

[url=http://www.wtssb.com/gol

[url=http://www.wtssb.com/gold.html]Scarlet Blade Gold[/url] good

Not a <a

Not a <a href="http://www.miamiheatssnapback.com/"><strong>Miami Heats Snapback</strong></a> soul loves working with a baseball cover which doesn healthy properly, nonetheless many of the modern styles usually are not made to healthy all mind sizing's. Many men and women tend to be deciding on to put on any snapback cover, <a href="http://www.miamiheatssnapback.com/"><strong>Miami Heats Snapback Hats</strong></a> that was once famous in the 1980 which is returning in to style once more.<br>
Remember that <a href="http://www.miamiheatssnapback.com/miami-heat-hats-c-98.html"><strong>Miami Heat Hats</strong></a> 80, as soon as it was the many rage for everyone to obtain any snapback cover? For some reason, these kinds of baseball hats seemed to venture out connected with style, and various styles grew to become more popular. <a href="http://www.miamiheatssnapback.com/knit-hats-c-161.html" title="Knit Hats"><strong>Knit Hats</strong></a> The only problem with the additional styles is the fact that numerous amounts usually are not adaptable. Several could possibly have Velcro straps, <a href="http://www.miamiheatssnapback.com/ncaa-snapback-hats-c-111.html"><strong>NCAA Snapback Hats</strong></a> nonetheless most are any agony, curly hair becomes found within them, and they also add always remain, especially if they are elder hats. Additional hats have a very strap in addition to buckle, <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-toronto-blue-jays-snapback-hats-c-131_154.html"><strong>Toronto Blue Jays Snapback Hats</strong></a> nonetheless once more, these kinds of are available loose, <a href="http://www.miamiheatssnapback.com/nfl-snapback-hats-c-65.html"><strong>NFL Snapback Hats</strong></a> which is any agony getting the small bit connected with strap standing, or maybe jammed in the ushanka in addition to feeling lumpy contrary to the mind. It really is probably for these reasons <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-boston-red-sox-snapback-hats-c-131_134.html"><strong>Boston Red Sox Snapback Hats</strong></a> the fact that snapbacks tend to be back in design in addition to turning into very popular once more.<br>
A direct email marketing, <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-c-131.html"><strong>MLB Snapback Hats</strong></a> donning one of these brilliant hats offers almost nothing whatsoever to do with the power to adjust it or maybe that comfort and ease. It really is due to the fact they will really like <a href="http://www.miamiheatssnapback.com/nba-snapback-hats-boston-celtics-snapback-hats-c-87_89.html"><strong>Boston Celtics Snapback Hats</strong></a> donning vintage clothes. This can be some thing which is extremely popular among lots of people, in addition to an increasing number of fashions in the 1980 tend to be returning in to style, which includes adaptable baseball hats. <a href="http://www.miamiheatssnapback.com/nba-snapback-hats-c-87.html"><strong>NBA Snapback Hats</strong></a> A very important thing with regards to these kinds of hats is the fact that not just are they exciting to put on and a well put together fun time in the earlier, they are also highly cozy, and may end up being modified to suit pretty much any mind size.<br>
<a href="http://www.miamiheatssnapback.com/nrl-snapback-hats-c-112.html"><strong>NRL Snapback Hats</strong></a> Many of the hats which have been accessible in the earlier decade or maybe so only aren made to healthy all people. Positive, <a href="http://www.miamiheatssnapback.com/nba-snapback-hats-denver-nuggets-snapback-hats-c-87_92.html"><strong>Denver Nuggets Snapback Hats</strong></a> numerous amounts come in compact, choice in addition to big sizing's, nonetheless these kinds of sizing's add always work with all people, several <a href="http://www.miamiheatssnapback.com/obey-snapback-hats-c-113.html"><strong>Obey Snapback Hats</strong></a> men and women only will get any cover which fits correct or maybe feels cozy. Which has a snapback cover, you can adjust that ushanka to any size you desire, in addition to not like additional styles of adaptable hats, <a href="http://www.miamiheatssnapback.com/nba-snapback-hats-cleveland-cavaliers-snapback-hats-c-87_123.html"><strong>Cleveland Cavaliers Snapback Hats</strong></a> this will likely stay in the size you desire it to. You add have got to fiddle by using any straps or maybe Velcro, and also the ushanka will have a very cozy healthy.<br>
Snapbacks tend to <a href="http://www.miamiheatssnapback.com/supreme-snapback-hats-c-114.html"><strong>Supreme Snapback Hats</strong></a> be effortless to adjust, and they also never come apart, until eventually you consider them a part. To the backside in the ushanka, you will find there's compact cheap remove about every side. On the list of strips offers minor nubs about it, and also the additional offers divots. <a href="http://www.miamiheatssnapback.com/the-hundreds-snapback-hats-c-115.html"><strong>The Hundreds Snapback Hats</strong></a> You simply find out which size is actually almost all cozy, then make in addition to place that nubs about one particular side in to the divots on the other hand. <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-atlanta-braves-snapback-hats-c-131_132.html"><strong>Atlanta Braves Snapback Hats</strong></a> These kinds of hats tend to be good with regard to confident any smaller sized or maybe much larger mind, and may obtain built in hats to suit correct.<br>
You will <a href="http://www.miamiheatssnapback.com/ymcmb-snapback-hats-c-116.html"><strong>Ymcmb Snapback Hats</strong></a> discover an array of the reason why these kinds of hats tend to be returning in to popularity. Certainly, the biggest cause to put on any snapback cover is the fact that you can adjust it to any size you <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-florida-marlins-snapback-hats-c-131_141.html"><strong>Florida Marlins Snapback Hats</strong></a> desire, which is always gonna end up being cozy.<br>
At present that <a href="http://www.miamiheatssnapback.com/dc-shoes-hats-c-110.html"><strong>DC Shoes Hats</strong></a> price ranges with regard to Miami housing get fallen and to buy a residence within Miami is often a worthwhile purchase. More than which Miami belongs to the greatest locations with regard to <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-cleveland-indians-snapback-hats-c-131_138.html"><strong>Cleveland Indians Snapback Hats</strong></a> holiday season across the world.<br>
Miami <a href="http://www.miamiheatssnapback.com/47-brand-snapback-hats-c-108.html"><strong>47 Brand Snapback Hats</strong></a> belongs to the most common in addition to famous locations with regard to holiday season. More than which, it really is a perfect spot to obtain another residence, wherever you can invest holiday season by using family and still have any relaxation.<br>
Right <a href="http://www.miamiheatssnapback.com/diamond-supply-co-snapback-hats-c-130.html"><strong>Diamond Supply Co. Snapback Hats</strong></a> now to obtain residence within Miami is actually especially plan of action. To begin with lately that price ranges get fallen considerably and they are right now less expensive. <a href="http://www.miamiheatssnapback.com/nba-snapback-hats-atlanta-hawks-snapback-hats-c-87_88.html"><strong>Atlanta Hawks Snapback Hats</strong></a> That mix off excellent Bradenton weather factors in addition to produced financial state connected with Miami makes this specific metropolis makes this specific <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-new-york-yankees-snapback-hats-c-131_150.html"><strong>New York Yankees Snapback Hats</strong></a> metropolis highly interesting with regard to successful men and women from across the world.<br>
Should you have <a href="http://www.miamiheatssnapback.com/nba-snapback-hats-chicago-bulls-snapback-hats-c-87_90.html"><strong>Chicago Bulls Snapback Hats</strong></a> by now thought steps to make long-term investment funds in addition to assure your immediate future of one's youngsters in addition to grandchildren in addition to simultaneously not to lose any health issues in addition to vigor, Miami is actually excellent <a href="http://www.miamiheatssnapback.com/nba-snapback-hats-dallas-mavericks-snapback-hats-c-87_91.html"><strong>Dallas Mavericks Snapback Hats</strong></a> choice available for you. In the event you choosed buy a residence within Miami you won't need to loose months of one's living thanks to awful wellbeing <a href="http://www.miamiheatssnapback.com/mlb-snapback-hats-detroit-tigers-snapback-hats-c-131_140.html"><strong>Detroit Tigers Snapback Hats</strong></a> any longer also it can be an awesome next residence with regard to your family.

This is very educational

This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post!

Paiguebeize <a

Paiguebeize <a href="http://vikawieier.com">xaikalitag</a> Dessstink http://uillumaror.com - iziananatt SIPHAGANNUAGO http://gusannghor.com SonStypeJen

Paiguebeize <a

Paiguebeize <a href="http://vikawieier.com">xaikalitag</a> Dessstink http://uillumaror.com - iziananatt SIPHAGANNUAGO http://gusannghor.com SonStypeJen

Another great post, I

Another great post, I appreciate all the work you put into this site, helping out others with your fun and creative works.

Hello,I love reading through

Hello,I love reading through your blog, I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts. <a href="http://www.nationalnewslive.com">http://www.nationalnewslive.com</a>

thanks for sharing!very

thanks for sharing!very good!Please find www.SoftwareTailor.com

у нас на данном веб-портале

у нас на данном веб-портале можно почитать <a href=http://maxxauto.ru/>о машинах</a>.

Yep! drupal is best blogging

Yep! drupal is best blogging platform. I have experience on this platform and its fun to work on it!
http://www.ifeel.edu.in

here at the above web -site

here at the above web -site you will be able to see a large selection of unique news <a href=http://chromebrowser.ru/>chrome</a>

Thank you, I have recently

Thank you, I have recently been looking for information approximately this topic for a long time and yours is the best I have found out so far.

All this dishes looks really

All this dishes looks really delicious and also very nice presented on the table. Casanova has been a great chef specially italian food.

I believe that you recognize

I believe that you recognize how to construct people pay attention to what you
have to pronounce,particularly with a concern that’s so vital. I am pleased to
suggest this blog.Please find Software Outsourcing (go to www.SoftwareTailor.com)

It seems too complex and

It seems too complex and extremely broad for me. I am looking forward for your next post, <a href="http://www.fengshuimastersingapore.com">fengshui</a>