[support] Trying to create a search form which allows users to input criteria and then displays matching nodes

Shai Gluskin shai at content2zero.com
Tue Sep 29 22:15:33 UTC 2009


Kelly,

The most straightforward way to do this is using "exposed" filters with
Views.

Look in the "filters" section of the Views form and choose one of the
criteria you want to give to users as a filter. After you've chosen the
criteria, you'll see a button the right hand side which says "expose," you
want to click on that.

That should be enough to get you started. There are a gazillion options of
how to set this up... experimenting is always a good thing!

Good luck,

Shai

On Tue, Sep 29, 2009 at 5:51 PM, Kelly Tanguay <ocelotspot86 at gmail.com>wrote:

> Hello,
> We are building a website for a car dealership. We have created a content
> type for inventory which allows the administrator of the website to enter in
> individual vehicles as inventory.
>
> Now we would like to add a feature where a client can search through the
> inventory. For example, if a client wants to see all cars that are made by
> Honda, or if a client wanted to search for cars withing a particular price
> range. Ideally we would like to be able to display the search results with
> views, but can hard code the page to display the different nodes if
> necessary.
>
> I understand that I am going to have to make a custom form. From what I
> understand, the best way to go about this is to take what the client
> inputted, and use that information to get the form to query the database,
> then display the nodes which match the criteria. However, I am a little
> fuzzy about the details. Has anyone set up anything like this before, or
> does anyone have any advice on the best way to go about doing something like
> this?
>
> Thanks for any and all help!
> Kelly
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/support/attachments/20090929/60aed630/attachment.htm>


More information about the support mailing list