In that case this should work:
VALIDATION
'county' '^[0-9]{1,2}$'
END
This limits county to a 1 or 2 digit number.
Note you'll get better performance using a plain string expression, e.g.:
CLASSITEM 'county'
CLASS
EXPRESSION '%county%'
...
END
Steve
From: Paul Maddock [mailto:[email protected]]
Sent: Wednesday, March 21, 2012 7:40 AM
To: Lime, Steve D (DNR); [email protected]
Subject: FW: Run-time Substitution
Mapserver 6.0.1
From: Lime, Steve D (DNR)
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Tuesday, March 20, 2012 6:31 PM
To: Paul Maddock;
[email protected]<mailto:[email protected]>
Subject: RE: Run-time Substitution
Which version?
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
On Behalf Of Paul Maddock
Sent: Tuesday, March 20, 2012 5:03 PM
To: [email protected]<mailto:[email protected]>
Subject: [mapserver-users] Run-time Substitution
Dear anyone willing to help,
I'm having a hard time interpreting how to properly execute runtime cgi
variable substitution using an <input> of type=text.
If I replace '%county%' with a sample county attribute value in single quotes
the EXPRESSION works and is displayed on the returned html template.
Currently my html input variable in the template looks like this :
<input type="text" id="county" name="county" />
...and my mapfile variable to be substituted for looks like this:
LAYER
NAME blah_ohio
STATUS OFF
TYPE POINT
DATA BLAH/BLAH_Ohio
PROJECTION
"init=epsg:3754"
END
CLASS
NAME 'Class1'
EXPRESSION ('[County]' eq
'%county%')
STYLE
SYMBOL "circle"
COLOR 250 50 50
OUTLINECOLOR 0
0 0
SIZE 2
END
END
METADATA
"wms_title" "blah_ohio"
"wms_srs" "epsg:4326"
END
END
Thanks in advance,
Paul
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users