I've installed the wonderful Availability Calendars module for a forthcoming holiday cottage website and all of that is fine and very impressive, however I'm stuck as to getting/creating a property search with the fields, location, availability, number of persons, number of bedroom. An example of what I want is on the following website which was created in Drupal http://www.maisonnera.eu/en , although I want my search to feature in a block not on the page.

From my understanding I'm sure it has to be done in views but has anyone got clear instructions on how to create such a view. I've created the custom fields - location, number of rooms, number of persons on a custom content page but the rest I'm a little stuck especially adding the pop up calendar to search the dates, and the drop down menus or textfields.

Hoping someone can throw some light on this matter.

Thanks

Comments

Forms not views

It sounds to me like you want to be researching forms, not views. Views is really about table data (since it's about creating in an user-friendly interface, complex queries and displaying the rows of returned data). You might want to use views to display the result of a users property search, but not for actually asking the user the question. For views, think multiple rows. It seems like what you want is a form, since what you want I think is a page which asks a user to fill in a number of fields. Ultimately this form input may be used as the input for a view, but the collection of what the user wants is really just a form.

There are 3 ways which come to mind for creating this form:

  • define a content type which has just the fields you want (e.g. define a content type of "search property" and add fields like "number of persons" etc.
  • do it within a module using the forms API (see http://drupal.org/node/751826 or http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/7
  • use a forms module, of which there is no doubt a big choice

Then you 'just' have to link the form output with the view. e.g. on the form you ask how many rooms, and on a properties view you have something like mysite/properties/%/%/% where each % represents something (e.g. no of rooms), so this might be mysite/properties/marseille/4/sea-view/.

drupalshrek
Maintainer of the VChess module visible in use at chess website Chesspos.com

Thanks for the rapid response

Thanks for the rapid response I will look in to this method.

I'm not 100% on how the

I'm not 100% on how the availability is checked based on duration however the rest is quite simple.

Yes, views is how to create this type of user interface.

To provide these options to the user you need to create filters, ie. Location etc and select 'exposed', with that there are a flow on of options about how this filter will be applied and how the user will see it. Drop downs are created when you choose 'select list' in the exposed filter options.

Region is created by taxonomy (terms) and type of accommodation probably is also.

The date and date pop-up are part of the date module.

Once exposed filters are created you can configure how these are displayed. You can choose to put the filters in a block which will allow you to put them in a sidebar or other region.

Thanks again for the rapid

Thanks again for the rapid response, will look into it further.