Skip to content
istvanp edited this page Sep 13, 2010 · 13 revisions

Welcome to the Wiki page for SAR (Smart Auto-Complete). Read on for more information.

Features

Auto-complete

Like any other auto-complete script, SAR will show a list of matching strings as the user types into the search field. A result can be selected with the mouse or the keyboard (using the up/down arrow keys and then pressing Enter).

Multi-column search & null handling

SAR handles searching on multiple columns of a database by allowing you to present each field separately with its own markup. It also handles cases where a column contains an empty result (is null) and allows you to specify a replacement string for each column.

Didn’t find what you were looking for? Add the missing information!

If SAR is used inside a form that creates records and certain fields are pulled from other tables, SAR can be used to search them. If, however, the user cannot find the correct matching record because it does not exist, SAR can be used to add missing information on all columns that are being searched (partially or all fields). The information is added through hidden input fields and can be accessed when the form is submitted. No need to go add the missing information first!

Efficient

Don’t hose your server down with wasted queries; SAR sends requests only on certain conditions:

  • A minimum number of characters has been entered
  • A minimum amount of time has passed between two requests
  • The search string is different from the previous request

Requirements

  • jQuery 1.3.x
  • Backend capable of outputting JSON

Getting Started

  1. Follow the steps in the Setup page
  2. Read about the possible options in the Settings page
Clone this wiki locally