In Drupal 7.10, I have created new content type with 15 fields and file upload for collecting input from end user(named inputdata). I need to create a search page with content field of "inputdata" (content type) . In views I select the "inputdata" using exposed filter 15 field is difficult, its not fair. So I need these 15 fields as drop down (instead of equal to , contains, greater than ...in exposed filter). So How do I get the names of fields as drop down for search ? Which modules I need to configure ?

5 Answers 5


I can only give you an example of querying the users table and displaying the people in the users table as an option but this might help:

  function example_page_builder() {

  $form = array();

 //getting the list of users
  $query = "select * from users where name!='';";

  $result = db_query($query);
  foreach ($result as $user) {
    $users[$user->uid] = $user->name;

  $form['example_field_set']['users'] = array(
    '#type' => 'select',
    '#weight' => -6,
    '#title' => t('Select User:'),
    '#options' => $users,

  return $form;
  • I am sorry; I am a beginner in Drupal, and I didn't understand function example_page_builder(). Is there any module?
    – veena
    Feb 9, 2012 at 8:02
  • example_page_builder is isn't own function and not a Drupal one.. Apr 7, 2013 at 13:32

Well there are many ways for this, but we have to know if the user input widget, if they are term references or just input boxes.

There is a module that could help you here, that is Hierarchical Select

another one that could help is custom search


You can use views or module, if you are creating website in drupal 6.

As per statement in project page of the module:

Views Or adds the ability to combine blocks of filters with OR. If one of the filters in the block is true, the combined block will be true.


You can use Better Jump Menu. In case you want to redirect it to a specific page and on the basis of getting the filtered Result.


enter image description here

As content represented by default in Drupal's views and its type as a filter you need to

  • Edit your view
  • In Filter Criteria section hit Add button
  • Start typing type (it will bring the type that you want)
  • Expose this filter to visitors, to allow them to change it have this checkbox checked

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.