Drupal Search field tweaks

This CodeLet tweaks the way the search field is displayed in search block. It adds an image button instead of normal submit button.

CodeLet: 


/**
* @file
*
* Tweaks the search feature and search fields
*
* @author DrupalD
*
*/

/**
* Implementation of hook_form_FORM_ID_alter
*
* @param $form
* @param $form_state
* @author DrupalD
*/
function search_tweak_form_search_theme_form_alter(&$form, $form_state) {
$form['submit'][''] = 'image_button';
$form['submit'][''] = drupal_get_path('module', 'search_tweak') .'/search.png';
}

Drupal Search field tweaks | Druapl Developer

By DrupalD on Wed, 03/07/2013 - 10:33am

Add comment

Log in or register to post comments
QR code for this page URL This page URL
Feedback