Customization of search and advance search fields.

2015-04-25 08:53:31 | Posted By Mr. Demo Administrator

This tutorial will help you understanding, how to customize (add, edit and remove) search fields according to you requirements. We have used property modules as example but this process can be applied to any other modules such as Flight, hotel, vacation rentals, tours or autos etc. There are two step of customizing the search form. There are:

Step 01 - Customizing the fields of a search form.

Step 02 - Mapping search fields with application’s module.
 
As shown in source code view, all field’s name are followed by SQL suffix. This is one of the MOST IMPORTANT aspects that indicates what type of sql query to run in order fetch desired data. We have summarized the SQL suffixes for your clear understanding as follows:
 
  • Text Search Query:
 
The Sign “_LIKE” must be appended as suffix (The ending part of a field name) to run LIKE SQL query. This keyword (_LIKE) is handy when you search a text date which matched with input field’s data.
 
 
  • Both Number and Text Query:
The Sign “_=” must be appended as suffix (The ending part of a field name) to run equals SQL query. This keyword (_=) is handy when you want to fetch text or number which is equals to given input field’s data.
 
 
  • Number Query:

The Sign “_<” must be appended as suffix (The ending part of a field name) to run smaller then SQL query. This keyword (_<) is handy when you want to fetch all numbers which is lower / smaller than given number.

The Sign “_>” must be appended as suffix (The ending part of a field name) to run grater then SQL query. This keyword (_>) is handy when you want to fetch all numbers which is higher / grater than given number.

The Sign “_<=” means Maximum number value. The Sign “_<=” must be appended as suffix (The ending part of a field name) to run smaller then or equals SQL query. This keyword (_<=) is handy when you want to fetch all numbers which is lower or equals than given number.

The Sign “_<=” means minimum number value. The Sign “_>=” must be appended as suffix (The ending part of a field name) to run grater then or equals SQL query. This keyword (_>=) is handy when you want to fetch all numbers which is higher or equals than given number.

 
 
  • Date Query:
The Sign “_<” is to represent before given data. The Sign “_<” must be appended as suffix (The ending part of a field name) to run before date SQL query. This keyword (_<) is handy when you want you want to fetch all result which is before than given date.

The Sign “_>”is to represent after given date. The Sign “_>=” must be appended as suffix (The ending part of a field name) to run grater then or equals SQL query. This keyword (_>=) is handy when you want to fetch all result which is after than given date.