> Good evening,
> I am publishing a FM Pro 5.0 database to the web. I have created a
> search page and am using 2 fields and a fixed logical operator to
> conduct an "and" search. When I leave the second field blank and
> submit the search the system conducts a search using just the one field
> and returns with a record. I need the system to return an error if
> either field is left blank. I have checked the fixed logical operator
> and it has the "and" option checked. The layout also has both the
> fields on it.
Yes, well, it is doing what you asked... Field1=value
and field2=blank is a valid find request, even with 'and'
searching (which is the default in any case, so doesn't need
to be specified)...
I've used this hack:
<input type="hidden" name="field" value=" ">
<input type="text" name="field" size="40">
This places a hidden default value for the field, which is
overidden when the user actually enters text and submits.
You could also look at the Exact Match parameter, described in
the CDML reference for -op:
You can use any FileMaker Pro Find operator by specifying the begins
with (bw) parameter. E.g., To specify the "Find Content Match" (==)
operator, you would specify the begins with parameter (bw) and then you
would place the characters "==" before the actual search criteria. The
required lines would look like this:
<input type="hidden" name="-Op" value="bw">
<input type="text" name="First" value="==Keith Proctor">
Personally, I don't see this as very useful for a password issue though
-
the user can over write it very easily.
Webko