rmflow
rmflow

Reputation: 4765

Drupal 7: Search fields

I've just started to learn Drupal and decided to implement a simple "Student list" site.

In my content type "Student" I have added a numerical field "age". And now, after entering some content and reindexing I want to perform search on the "age" field.

If I enter some valid age into search box, then nothing is found.

How do I find students by age or by age range?

Upvotes: 0

Views: 1871

Answers (1)

roberthernandez
roberthernandez

Reputation: 524

If you're new to Drupal, each of these steps will require its own instruction. Luckily, there are plenty of tutorials on the interweb.

To create a sortable/filterable list page from your student content type:

  1. Create a view from the student content type.
  2. Set the new view's display type to Table View and ensure that the the age colum is listed as a field you want to display.
  3. Set the table's headers to clickable (so that you can sort your list when it's displayed.)
  4. Use exposed filters to allow people to filter your group by an age, age range, or other criteria (e.g. last name, etc.).

I'd consider the following searches for each step:

  1. Drupal 7 Create View site:youtube.com
  2. Drupal 7 Table View Display Format
  3. Clickable Table View Headers in Drupal 7
  4. Drupal 7 Exposed Filter site:youtube.com

Upvotes: 1

Related Questions