Francesco Tomei wrote:
>
> Hi all,
> I'm trying to go through with a search in pmapper using two connected
> field. I've read the examples in the manual but I didn't get through.
> I'd like to know exactly how to use the "suggest" and "options" operator
> in order to have a list of value selectable in one field depending on the
> value chosen in the first list of value of another field. At the moment
> I'm able to do only the first part of the query with the "suggest"
> operator, but once I've selected a value
> I didn't get any restriction in the second list.
> I there any documentation about?
> I hope to have correctly explained the problem.
> Thanks in advance,
> Francesco
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>
>
If I have understood your problem should resolve this:
<searchitem name="pt_oopp_point" description="PT_OOPP">
<layer type="postgis" name="pt_oopp_point">
<field type="s" name="comune" description="Comune"
wildcard="2">
<definition type="options" connectiontype="db"
sort="asc"
firstoption="*">
<dsn
encoding="UTF-8">pgsql://postgres:[EMAIL PROTECTED]/PIT_LISUT</dsn>
<sql>SELECT DISTINCT comune,comune FROM
pt_oopp_point WHERE comune
is NOT NULL ORDER BY comune</sql>
<dblayer encoding="ISO-8859-1"
keyfield="comune"
showfield="comune"/>
<events>onchange="resetSuggestCache();$('#pmsfld_pt_opp_1').val('')"</events>
</definition>
</field>
<field type="s" name="descrizion" description="Descrizione"
wildcard="2">
<definition type="suggest" connectiontype="db"
sort="asc"
minlength="1" dependfld="cmcncd">
<dsn
encoding="UTF-8">pgsql://postgres:[EMAIL PROTECTED]/PIT_LISUT</dsn>
<sql>SELECT DISTINCT descrizion FROM
pt_oopp_point WHERE descrizion
~* '^[search]' ORDER BY descrizion</sql>
<events>onchange="resetSuggestCache();$('#pmsfld_pt_opp_1').val('')"</events>
</definition>
</field>
</layer>
</searchitem>
The code above is on a layer PostGIS!
Bye
-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
--
View this message in context:
http://www.nabble.com/pmapper-search-help-tp17743645p17754101.html
Sent from the pmapper users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users