Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using Input Type Password - Exact Search

Featured Replies

Is there anyway to have an exact search when using the input type password?

<INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10>

When a user puts in a correct password there is no problem returning the list page. When a user puts in the wrong password they get an error page.

The problem is when a user accidentally types an * (asterisks). This is a FM database find for zero or more characters.....the user retrieves the entire list and not just their own record.

Is there an easy way to prevent this from happening -- using this particular command?

Thanks in advance!

Donna

Try this:

<INPUT TYPE="hidden" NAME="-op" VALUE="==" >

<INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10>

All the best.

Garry

  • Author

I tried your suggestion, but it didn't work. It still retrieve the entire list.

This is what I have:

<INPUT TYPE="hidden" NAME="-Find" VALUE="==">

<INPUT TYPE="hidden" NAME="FY" VALUE="FY2003">

<INPUT TYPE="hidden" NAME="-op" VALUE="==">

<INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10>

Would the order make any difference? Any other suggestions?? Thanks!

<INPUT TYPE="hidden" NAME="-Find" VALUE="==">

<INPUT TYPE="hidden" NAME="FY" VALUE="FY2003">

<INPUT TYPE="hidden" NAME="-op" VALUE="==">

<INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10>

It appears that you are trying to enter the value "==" into a field named "Find". Change the name of your field if that is the case.

From the above it appears that you are trying to search three fields, "Find" and "FY" and a password field which is unnamed and referred to as "fieldname".

If you are just trying to make and Exact Field Match of the password, and that password were in a field named "pword", that part of your code could look something like:

<INPUT TYPE="hidden" NAME="-op" VALUE="==">

<INPUT TYPE="password" NAME="pword" VALUE="" SIZE=10>

OR:

<INPUT TYPE="hidden" NAME="pword" VALUE="==">

<INPUT TYPE="password" NAME="pword" VALUE="" SIZE=10>

  • Author

The part of my code that states:

<INPUT TYPE="hidden" NAME="-Find" VALUE="==">

is a trick I found in the FM knowledge database that makes a Find button accessible either through clicking on the button or pressing the "Enter" key. It works really well.

The rest of the code......searches the database and limit the records to FY2003 plus matching the password field.

My problem happens only when a user enters an * (astericks) into the password field by mistake. They then retrieve all the records and not just their record. FM sees this as a search request for zero to any characters. So, it retrieves everything.

I didn't want to have to put full blown security on it because only a select few even know of its existence. Even if it were hacked into 99.9% of the information is available for public use anyway. No big secrets here.

Thanks for trying!

Any other suggestions? Donna

You can check for that with JavaScript.

Search for form validation...

  • Author

I don't know anything about Java.....thanks anyway. Donna

Here is a solution which uses some Javascript (no Java):

<head>

 <title>Password</title>

 <script>

   function subForm ()

      {

      if ((document.myform.fieldname.value).indexOf("*") != -1 )

         { alert ("Asterisks * are not allowed in the Password!!!"); }

      else

         { document.myform.submit(); };

      }

   </script>

</head>

<body>Enter your Password:

<form name="myform" action="FMPro" method="post" onsubmit="subForm(); return false;">

<INPUT TYPE="hidden" NAME="-op" VALUE="=="> 

<INPUT TYPE="hidden" NAME="FY" VALUE="FY2003"> 

<INPUT TYPE="hidden" NAME="-op" VALUE="=="> 

<INPUT TYPE="password" NAME="fieldname" VALUE="" SIZE=10> 

<INPUT TYPE="hidden" NAME="-Find" VALUE="">

<INPUT TYPE="submit" NAME="-Find" VALUE="Find Records">

</form>

</body></html>

All the best.

Garry

  • Author

Thank you! Thank you! Thank you! You rock!

Worked like a charm the first time around.....

Donna cool.gif

  • 3 weeks later...

Hi,

I have tried this and the * part works great but I still have the problem with the -op and "==".

For the examples, the password field is last name and last 4 digits of the id number. So smith1234.

If I use

<INPUT TYPE="hidden" NAME="-op" VALUE="==">

<INPUT TYPE="text" NAME="Password" VALUE="" SIZE="20">

<INPUT TYPE="hidden" NAME="-FIND" Value="">

<INPUT TYPE="submit" NAME="-FIND" Value="Search">

then entering smith shows all smith and entering smith* shows "no asterisks allowed".

If I use

<INPUT TYPE="hidden" NAME="Password" VALUE="=="> (Password instead of -op)

<INPUT TYPE="text" NAME="Password" VALUE="" SIZE="20">

<INPUT TYPE="hidden" NAME="-FIND" Value="">

<INPUT TYPE="submit" NAME="-FIND" Value="Search">

then entering smith takes me to -err page but entering smith* doesn't no longer work.

Entering smith1234 works in both.

Thanks you for help,

nati

Because you now have two <input> tags named "password" you will have to use a different Javascript method to distinguish them.

If the "-op" is not producing an Exact Match you can go to FM, after you attempt a login, and do a "Modify Last Find". This will show what FM was trying to look for.

Good Luck.

Garry

I have changed the -op to .eq and this seems now to work.

thanks,

nati

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.