Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Please mark it as answered if it helped. Commented Mar 4, 2016 at 4:43
  • Hi tried cleared the cache and unfortunately it did not work Commented Mar 6, 2016 at 15:34
  • Updated my answer. The order of statements matter. $form['name']['#attributes'] = array('placeholder' => t('username')); is replacing the complete attributes array and the changes made to the array before that will have no effect. Add the class after the setting the attributes array. Commented Mar 7, 2016 at 4:07