Jump to content

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

Recommended Posts

Posted

Hi.....

Is it possible to use the FMP-If command to check whether or not a field has been filled in on a form? I basically don't want the user to be able to go to the next screen unless certain fields are filled in. I know that I can restrict the field in the database, but I was wondering if the web form could check this for me.

I have an example in JavaScript but I don't know how to make the reference to the FM field.

Any suggestions?

Thanks! Donna

Posted

RE: I have an example in JavaScript but I don't know how to make the reference to the FM field.

You are not doing reference to FM field with JS, but you should check by JS if the field is not empty BEFORE you will submit something.

That way the validation is instantaneous and not the submit -- fill the db -- response page -- fill in

Posted

Definitely use the JS

This is the one I use for a login routine (courtesy of Armando Ghisalberti)

<script language="JavaScript">

function validate_loginform() {

validity = true;

if (document.loginform.Username.value == "")

{

alert('Enter Username !');

document.loginform.Username.focus();

return false;

}

if (document.loginform.Password.value == "")

{

alert("Enter password!")

document.loginform.Password.focus();

return false;

}

if (validity)

return validity;

}

</script>

</HEAD>

<form name="loginform" action="FMPro" method="post" onSubmit="return validate_loginform()">

<INPUT Type=text name=Username size=220

<INPUT Type=password name=Password size="">

Posted

Although I agree that JavaScript is probably going to be the best solution, I heard you can also do this completely in FileMaker using global fields (I have not used this myself but thought I should mention it in case you already have JS scripting in your code and are worried about conflicts).

Posted

And you can do it with your own password (unique identifier) schema through a -Find.

But JS (client handling) is the best way. Why tie up the db file(s) with unnecessary actions?

This topic is 8018 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.