[pmapper-users] search.xml with 2 fields (one depending on another)

2013-05-30 Thread Sylvain Arabeyre
Dear all,I've been struggling with the search.xml and the dependfld parameter.I want to set a search with 2 fields, one depending on another (a suggest depending on an option) with shapefile data.My problem is that the "suggest field" suggests all values from the data without taking into account th

Re: [pmapper-users] search.xml with 2 fields

2013-04-05 Thread Chris forum
Hi Armin, Thomas, I had to deal with another little problem, accents in the street names from the postgis DB which is encoded in ISO-8859-1. - They are replaced by a special text character in the drop down menu. Just need to specify the right dns for both fields in the search.xml file: The cont

Re: [pmapper-users] search.xml with 2 fields

2013-04-04 Thread Chris forum
Hi Armin, Thomas I've just replaced the 3 compressed JS files, search works fine now using them! Ok, flushCache is set. Thx a lot guys, pmapper rocks! Chris On Wed, Apr 3, 2013 at 7:39 PM, Armin Burger wrote: > On 04/03/2013 03:55 PM, Chris forum wrote: > > Should I dare asking a last qu

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Armin Burger
On 04/03/2013 03:55 PM, Chris forum wrote: > Should I dare asking a last question? > Do I better use this, what is it actually doing? > onchange="$('#pmsfld_numero').val('').flushCache()" > that resets the text input field and empties the auto-complete cache of the suggest, so usually it is reco

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Armin Burger
On 04/03/2013 03:28 PM, Thomas RAFFIN wrote: > The compress js version is certainly not up-to-date. > > Armin, could you update the js compress files please? Hi Thomas I updated now the compressed JS files to SVN trunk. I was believing you were also committing these ones to SVN. It means that th

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Well done! \o/ Works perfectly now : )) Thank you so much Thomas! Should I dare asking a last question? Do I better use this, what is it actually doing? onchange="$('#pmsfld_numero').val('').flushCache()" On Wed, Apr 3, 2013 at 3:28 PM, Thomas RAFFIN wrote: > The compress js version is cert

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Thomas RAFFIN
The compress js version is certainly not up-to-date. Try to change your configuration like this: javascript/src Armin, could you update the js compress files please? Le 03/04/2013 14:35, Chris forum a écrit : > Still no luck here... > I copy/paste your search above, replacing the test shema with

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Still no luck here... I copy/paste your search above, replacing the test shema with public one, but the second field is still not proposing anything. Here under the content of the pm_debug.log, with 'abe'->Abeilles and '2' values used in the fields. Looking at the last line of the log, I have tri

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Thomas RAFFIN
Hi, With your data and this search definition it worked yesterday: @ SELECT DISTINCT lastname FROM test.goeland_addresse_lausanne WHERE lastname IS NOT NULL ORDER BY lastname @

Re: [pmapper-users] search.xml with 2 fields

2013-04-03 Thread Chris forum
Hi Thomas, Thx a lot for the explanation, I have chosen to use the nosubmit="1" parameter. First field works now, the query is not launched anymore when a suggested street name is clicked: So I am a step further, there is still a problem though with the second field: it doesn't suggest anythin

Re: [pmapper-users] search.xml with 2 fields

2013-04-02 Thread Thomas RAFFIN
OK, it is due to bad configuration. You could do one of those: - Unactivate auto submit for suggested fields ==> set "PM.suggestLaunchSearch = false;" in js_config.php (applies to all suggested fields!) - keep "PM.suggestLaunchSearch = true;" and add to each definition where it is needed the "n

Re: [pmapper-users] search.xml with 2 fields

2013-04-02 Thread Thomas RAFFIN
Hi, Le 02/04/2013 10:08, Chris forum a écrit : > Still struggling with the search function. > > To resume what I am experiencing with a 2 fields search, which > consists in finding a street name and then a building number on this > street: > > 1) It looks like I can not set the first field sear

Re: [pmapper-users] search.xml with 2 fields

2013-04-02 Thread Chris forum
Still struggling with the search function. To resume what I am experiencing with a 2 fields search, which consists in finding a street name and then a building number on this street: 1) It looks like I can not set the first field search mode to 'options', my postgis table is too big (~10'000 rows

Re: [pmapper-users] search.xml with 2 fields

2013-03-27 Thread Chris forum
Hi Thomas, Thx for your fast reply! The of my last message was related to a shapefile for a test. That's why I didn't add an SQL query in it as I didn't see any shapefile example with an sql tag. Anyway, I just tried to add: SELECT DISTINCT NUMBER FROM building _shp"> WHERE TYPE = '[dependfldval

Re: [pmapper-users] search.xml with 2 fields

2013-03-27 Thread Thomas RAFFIN
I think you have to define the SQL query for suggest option with depend field val. Here is an example for the 2d field that depend on field1 @ SELECT DISTINCT field2 FROM schema.table WHERE field1 = '[dependfldval]' AND f

[pmapper-users] search.xml with 2 fields

2013-03-27 Thread Chris forum
Hi all, I am having a hard time getting to work a search with 2 fields, second one being dependant of the first one. I especially would like to do that with data coming from PGSQL . I know there are examples in the search.xml of the wiki, but I am not able to reproduce them with the demo data: -