Hi,

does it work without the brackets in your form?
<select name="vitigni">

because your URL is
http://localhost/cgi-bin/mapserver/mapserv.exe?map=//nbgis01/mapserver/umbe/mapfile/test10_runtimesubstitution.map&[vitigni]=Chardonnay...

and should be
http://localhost/cgi-bin/mapserver/mapserv.exe?map=//nbgis01/mapserver/umbe/mapfile/test10_runtimesubstitution.map&vitigni=Chardonnay...

Jörg

Am 28.11.2017 um 14:38 schrieb umbertofili...@tiscali.it:
> Good day list!
> 
> I am trying to do a runtime substitution to pass a parameter from a form to 
> my mapfile, but cannot geti t to work.
> 
> Let's say I have a mapfile which looks like (only relevant part):
> 
>       LAYER
>         NAME zone
>         ...
>         FILTER ('[vitigni]' = '%vitigni%')
>               END
> 
> I have a form in my HTML with a dropdown list where some values are listed.
> I'd like to pick the value selected by the user and pass it to my FILTER, in 
> place of the %vitigni%.
> 
> I tried with the below form.
> 
>                 <form name="mapserv" method="GET" 
> action="http://localhost/cgi-bin/mapserver/mapserv.exe?";>
>               <input type="hidden" name="map" 
> value="//nbgis01/mapserver/umbe/mapfile/test10_runtimesubstitution.map">
>               <select name="[vitigni]">
>                                       <option value="Chardonnay, Pinot nero, 
> Pinot bianco">Chardonnay, Pinot nero, Pinot bianco</option>
>                                       <option value="Marzemino, Barbera, 
> Schiava gentile, Cabernet">Marzemino, Barbera, Schiava gentile, 
> Cabernet</option>
>                                       <option value="Trebbiano di 
> Soave">Trebbiano di Soave</option>
>                                       <option value="Groppello, Marzemino, 
> Barbera, Sangiovese.">Groppello, Marzemino, Barbera, Sangiovese.</option>
>                       </select>
>               <br><br>
>               <input type="submit" value="Click Me">
>                 </form>
> 
> Only thing I receive is: 
> http://localhost/cgi-bin/mapserver/mapserv.exe?map=%2F%2Fnbgis01%2Fmapserver%2Fumbe%2Fmapfile%2Ftest10_runtimesubstitution.map&%5Bvitigni%5D=Chardonnay%2C+Pinot+nero%2C+Pinot+bianco
> I know this is not the right way the request should be created.
> If I manually replace %vitigni% with one of the values provided in the form 
> modifying the mapfile, everything works, proving the mapfile is correct (es. 
> FILTER ('[vitigni]' = ' Chardonnay, Pinot nero, Pinot bianco ')).
> 
> Any suggestion would be very appreciated! Thanks
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


Viele Grüße,
Jörg Thomsen

-- 

***********************************
Where2B Konferenz 2017
14. Dezember 2017 in Bonn
www.where2b-conference.com
***********************************

Jörg Thomsen
WhereGroup GmbH & Co. KG
Gillweg 3
14193 Berlin
Germany

Fon: +49 (0)30 / 5130 278 74
Fax: +49 (0)30 / 89 09 53 21

joerg.thom...@wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
Folgen Sie der WhereGroup auf twitter: http://twitter.com/WhereGroup_com
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to