[ create a new paste ] login | about

Link: http://codepad.org/iAV0gkvG    [ raw code | output | fork ]

PHP, pasted on Jan 13:
1
2
3
4
5
function HOOK_form_alter(&$form, &$form_state, $form_id) {
  if(strstr($form_id, 'node_form')) {
    $form['title']['#attributes']['placeholder'] = t('Put Your title here');
  }
}


Output:
1
2
3
4
5
function HOOK_form_alter(&$form, &$form_state, $form_id) {
  if(strstr($form_id, 'node_form')) {
    $form['title']['#attributes']['placeholder'] = t('Put Your title here');
  }
}


Create a new paste based on this one


Comments: