[Cartoweb-dev] Search plugin

Sylvain Beorchia sylvain.beorchia at makina-corpus.com
Wed Feb 14 09:29:33 EST 2007


Hi,

I use the locate plugin to find objects, here is the configuration of my
locate.ini :

locate.0.id = parcelle
locate.0.label = "Parcelle"
locate.0.sql= "SELECT GID, NUMERO FROM parcelle WHERE NUMERO ~* '%s'
LIMIT 20"

locate.1.id = localisant
locate.1.label = "Localisant"
locate.1.sql= "SELECT GID, SECTION FROM divcad WHERE SECTION ~* '%s'
LIMIT 20"

The plugin works fine, and i can have the AJAX list appear when i type a
few characters in the edit search field.

Now, is it possible to have sqlStrings (locate.0.sql) which deal whith
the result of another search field.

Example:

A parcelle object has got theses attributes :

	GID  SECTION   NUMERO
	1    AB        001
	2    AB        002
	3    AC        001

I'd like first the user to choose the section in a field, and then when
he types some numbers to find a parcelle, the result is filtered whith
he section.

See ?

Thanks.

Sylvain B.
Makina Corpus.




More information about the Cartoweb-dev mailing list