Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have to validate a field in a form, I beleive that my problem is not solvable with Javascript.

The form is a competition which all entrants only can apply once. And the only workable solution to that is to make sure that people can't enter with the same e-mail address twice. The form and format page have to check if someone tries to enter the competition twice (or more) with the same e-mail address.

I have javascript validation on all the required fields (such as name, phone ...) and I've tried to use the FMP control attributes on fields (such as: required value, not-empty and so on). But all that happens is that I can get the format page use the error code sent out by WC (code 504) and print: "You have already answered... you bastard", but the information with the same e-mail address is added to the database. The only difference is that it doesn't contain the duplicate e-mail address.

Is there anyway I can stop FMP from adding that post?

Posted

Gary,

Won't that hang the server? I thought they popped up an error message on the server and hung there until someone clicked okay. That being an os9.x server of course.

Does this still happen in Unlimited?

Posted

FWIW, I just tested this concept on Internet Explorer. My -error page was not returned. Instead I got a pop-up window "Internet Explorer Script Alert" which had the message,

"Your attempt to edit a record failed because of the following:

"Not unique value on field "expire" "

Posted

I've just had a chance to do my own test with:

<form action="FMPro" method="post">

<input type="hidden" name="-db" value="combotest.fp5">

<input type="hidden" name="-lay" value="web">

<input type="hidden" name="-format" value="hworld2.html">

<input type="hidden" name="-error" value="fmperror.html">

<input type="hidden" name="-recid" value="[FMP-CurrentRecID]">

Field b1: <input type="text" name="my_rec_serial#" value="[FMP-Field: my_rec_serial#]">

<input type="submit" name="-edit" value="Edit"></form>

Here is the fmperror.html contents:

</head>

<body>

Error [FMP-CurrentError]

</body>

It is working OK for me; it returns error code 504. I am using FMP 5.5v2 on Mac OS X.

All the best.

Garry

  • 3 weeks later...

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