Jump 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.

Userid + Password

Featured Replies

  • Newbies

How can I use the find statement to search both (Userid and password) fiels at the sametime.!

-op=??? or -lop=??

Just include both, the default is AND.

Just make sure the result is valid, and none of the submitted values is empty.

Hi, the trouble with Filemaker is that it will return a result if you only fill in one of the fields. Use this little gizmo to force the user to fill in both name and password.

NOTE: it only checks fields called required_*something*, so that is how to name your FileMaker fields.

<HTML>

<HEAD>

<TITLE>enter the database</TITLE>

<SCRIPT LANGUAGE="JavaScript"><!-- Original: wsabstract.com -->

<!-- Begin

function checkrequired(which) {

var pass=true;

if (document.images) {

for (i=0;i<which.length;i++) {

var tempobj=which.elements;

if (tempobj.name.substring(0,8)=="required") {

if (((tempobj.type=="text"||tempobj.type=="password")&&

tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&

tempobj.selectedIndex==0)) {

pass=false;

break;

}

}

}

}

if (!pass) {

shortFieldName=tempobj.name.substring(8,30).toUpperCase();

alert("You must fill in both username and password");

return false;

}

else

return true;

}

// End --></script>

</HEAD>

<P><FORM ACTION="FMPro" METHOD="post" name=enterform onsubmit="return checkrequired(this)">

<INPUT TYPE="hidden" NAME="-DB" VALUE="namesandpasswords">

<INPUT TYPE="hidden" NAME="-Lay" VALUE="Layout1">

<INPUT TYPE="hidden" NAME="-format" VALUE="new.htm">

<INPUT TYPE="hidden" NAME="-error" VALUE="enter2.htm">

<INPUT TYPE="hidden" NAME="-max" VALUE="1"><INPUT TYPE="hidden" NAME="-lop" VALUE=AND>

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

name<BR>

<INPUT TYPE=text NAME="required_username" VALUE="" SIZE=26><BR>

<INPUT TYPE="hidden" NAME="-op" VALUE=eq>password<BR>

<INPUT TYPE=password NAME="required_password" VALUE="" SIZE=26><BR>

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

</FORM></P>

</BODY>

</HTML>

regards, jeff

You can do it in CDML and FM also, e.g. to use calc field with Name & Password and compare that...

  • Author
  • Newbies

I tryd using your javascript and FM strings without succes. I copied it exactly.. I only changed the input values. I do not know anything about javascript. I am using Adobe Golive 6.

Maybe you know what I am doing wrong???

Much easier is to do it directly in FM smile.gif

  • Author
  • Newbies

How?? confused.gif

  • Newbies

If you use the web security database, you can specify to find the user name and password through text input:

<input type="hidden" name="-op" value="eq">Last Name:(text box)

<input type="text" name="LastName" value="">

Then have it submit

<input type="hidden" name="-find">

<input type="submit" value="Submit">

You can do it in CDML and FM also, e.g. to use calc field with Name & Password and compare that... as mentioned above

  • 3 weeks later...

Hi,

this FM code is not checking anything.When we press the submit button without entering login name and password it directly going to the format file.

Can any one give me code for login and password checking

Do you have the WebSecurity on?

Hi, sorry you couldn't get the java checker to work. In the sample files section of the forum, I posted some stuff about calendars and the logon pages to holiday booking in that use the password script. if you download those files, you can see it working and get the code.

regerds, jeff

Hi jeff,

Can u please tell me in which file of that holiday booking sample the password script presents.

regards,sri

Hi, look in the directory 'holidays' at the format file 'holidayenter.htm'

If the search is sucessful, it passes you through to the 'new.htm' page and the holiday database, if a match isn't found, you get another try at 'enter2.htm'

I'ts accessing the 'master contact list' database to check username and password. If you just load the whole lot into the filemaker web folder, you should be able to get it working from a browser on the same machine - see the 'links.htm' page for details.

regards, jeff

Create an account or sign in to comment

Important Information

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

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.