I have a date filter that I have exposed on my view. I want to make the interface more user friendly and tighten up the look of it. Instead of selecting a date I would like to select from the following options.
- The last day
- The last week
- The last year
- All
This would then filter on the date field. Is this possible? How would you go about doing this?
The proper way to do it is to alter the form in a custom module using
hook_form_alter
:$form
is an array describing the form, using Drupal Form API. You can inspect this array usingdpm
from the Devel module.It is possbile, but you will need to write your own module for that.
That module would use the method called "Form Alter" to change the form. Try starting here http://drupal.org/node/157253