Posted By

discipolo on 02/14/11


Tagged

drupal templatephp preprocess


Versions (?)

html5 placeholder drupal search form


 / Published in: PHP
 

  1. // Add some cool text to the search block form
  2. function acq_margintest_form_alter(&$form, &$form_state, $form_id) {
  3. if ($form_id == 'search_block_form') {
  4. // HTML5 placeholder attribute
  5. $form['search_block_form']['#attributes']['placeholder'] = t('enter search terms');
  6. }
  7. }

Report this snippet  

You need to login to post a comment.