December 11, 200223 yr Newbies I know it must be something simple (or at least I hope it is) but I just can't get this to work. I have a database with a ID# text field and a Password text field. On the web page, teachers can pull up their registration by entering both their ID and their Password. <Problem enters stage left> Either field can be entered and it will pull up their info...one can be left blank and it lets it in. How do I make it look for *both* using CDML? Or, would it be easier to copy/paste javascript for the required fields? Here is what i have at the top of the form: [color:"green"] <FORM ACTION=FMPro METHOD=post> <INPUT TYPE=hidden NAME=-DB VALUE='competencyspring.fp5'> <INPUT TYPE=hidden NAME=-Lay VALUE='AllFields'> <INPUT TYPE=hidden NAME="-format" VALUE="search_results.htm"> <INPUT TYPE=hidden NAME="-sortfield" VALUE="Selected Date"> <INPUT TYPE=hidden NAME="-error" VALUE="search_error.htm"> <INPUT TYPE=hidden NAME="-max" VALUE=all> <INPUT TYPE=hidden NAME="-lop" VALUE=AND> Any help you can give would be greatly appreciated. I've searched the web but found nothing...or at least nothing that I recognized as being helpful to this exact question. Thanks :-)
December 11, 200223 yr Try this: <FORM ACTION=FMPro METHOD=post> <INPUT TYPE=hidden NAME=-DB VALUE='competencyspring.fp5'> <INPUT TYPE=hidden NAME=-Lay VALUE='AllFields'> <INPUT TYPE=hidden NAME="-format" VALUE="search_results.htm"> <INPUT TYPE=hidden NAME="-sortfield" VALUE="Selected Date"> <INPUT TYPE=hidden NAME="-error" VALUE="search_error.htm"> <input type="hidden" name="-op" value="eq"> <input type="text" name="ID#"> <input type="hidden" name="-op" value="eq"> <input type="password" name="Password"> Hope this helps. Garry
December 12, 200223 yr Author Newbies With that I can fill in either field and, if correct, it will pull up the record...I've added the <INPUT TYPE=hidden NAME="-lop" VALUE="AND"> tag even though I think that is assumed if not included. Any other ideas.
December 12, 200223 yr Hi, brellis! Actually, I think this Q comes up often and should be in the posts. From what I recall, there are 2 popular ways... 1 keeps you in FM and the other uses JavaScript. Look for keywords like "password" "login" "verify" and whatnot. If you don't find it or no one helps you, I'll check for you later but I gotta go, now. Sorry. --ST
December 12, 200223 yr The "-lop=AND" is the default, so you do not need to have it in the form. Using the "-op=eq", prior to each field, forces each of these fields to match the value entered. You can also try: <input type="hidden" name="-op" value="=="> This more like what is used directly in FM. All the best. Garry
Create an account or sign in to comment