Jump to content

This topic is 8087 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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 :-)

Posted

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

  • Newbies
Posted

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.

Posted

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

Posted

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

This topic is 8087 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.