Add html5 placeholders to node_add inputs I'd like to add placeholders to node_add field inputs. I'm trying to use dpm($form) but am not sure where to put it. I couldn't get node-add.tpl to work with this

 function MYTHEME_theme() {

  $items = array();

  $items['node_add'] = array(
    'render element' =&gt; 'form',
    'path' =&gt; drupal_get_path('theme', 'MYTHEME') . '/templates',
    'template' =&gt; 'node-add',
    'preprocess functions' =&gt; array(
      'MYTHEME_bootstrap_preprocess_node_add'
    ),
  );

  return $items;

}


The only template I got to work was page--node--add.tpl but $form shows a blank krumo.
To add placeholders, or any custom attributes, you need to dig deeper: implement appropriate hook_form_FORM_ID_alter. For node add/edit form, it will be mymodule_form_node_form_alter. First parameter is &amp;$form - as you can see, it is taken by reference, so changes made to it are carried outside the function. Use dpm($form) to find appropriate element. Once you do, use #attributes to add attributes you want.