[support] need help in search_form_alter

bharani kumar bharanikumariyerphp at gmail.com
Wed Jun 24 03:52:03 UTC 2009


Hi ,
I want to customize the default search module ,

So i want to add the drodown list box with search text box, here is the
alter form ,


Then what is the next steps , for search the article by dropdown list ,

I want to add my drop down list  value into select query where condition ,

How i do ,



here is the code

function search_form_alter(&$form, $form_state, $form_id) {
  switch ($form_id) {
    case 'search_theme_form':

  $form['selectlist'] = array(
  '#type' => 'select',
  '#default_value' => variable_get('feed_item_length','teaser'),
  '#options' => array(
    'user' => t('user'),
    'location' => t('Location'),
    'age' => t('age'),
  ),
  '#description' => t('Select type.'),);
  break;
  }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090624/4497d69d/attachment.htm>


More information about the support mailing list