Jump to content
Server Maintenance This Week. ×

Required Value Error Customization?


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

Recommended Posts

I am using a WEB form with an FMP 4.0 database. It is a survey with certain values defined as "required values." My problem is that I want to be able to customize the error message to give the missing field names in RED, or something comparable, if the person does not fil out all the required values. Is there a way to do this? It is very difficult for users to figure out what is missing if I leave the default page...

Thanks!

-dana

------------------

Dana L. Hernandez

danabase technologies

http://www.danabase.net

Link to comment
Share on other sites

All error codes from FM also work on web. You can set the conditions in your error.htm page.

Hth

quote:

Originally posted by danabase:

I am using a WEB form with an FMP 4.0 database. It is a survey with certain values defined as "required values." My problem is that I want to be able to customize the error message to give the missing field names in RED, or something comparable, if the person does not fil out all the required values. Is there a way to do this? It is very difficult for users to figure out what is missing if I leave the default page...

Thanks!

-dana


Link to comment
Share on other sites

  • 1 month later...

Actually, I have figured out how to do it and works great.

I first set up a calculation field called error and it basically says this... (but am writing it in plain english rather than script for ease of understanding.)

*** in database... ***

*** calc field called error****

*** calculation says...***

If the first name field is blank then display "Please go back and enter your First Name"

Else

If the last name field is blank then display "Please go back and enter your Last Name"

Else

If the Address field is blank then display "Please go back and enter your address"

Else

If all of the fields are filled in then leave the error field blank and exit the script.

**** this is the end of the script in the database****

Then in the web file, use as if statement that says if the error field is not blank then display the contents of the error field, otherwise just say "Thank you for filling out the form." The contents of the error field, if it's not blank, will tell the user what they missed and what to do.

Two problems you may encounter:

1) you can not actually allow them to go back. You may have to make another page that allows them to edit the record they already created since you don't want them to create another new record as they did on the previous page.

2) this will only work for blank fields as far as I know any may not work for checking for unique fields or fields with criteria or other things. You have to use the error capture to do this.

Link to comment
Share on other sites

  • 4 weeks later...

I tried this out some time ago, FMP 4.0v3.

One way is to use set FMP field validation in the database, but unfortunately if the web form has more than one field that is validated "not empty" I cannpot find a way to determine which prticular field is not empty. A work-around is to have each validated field on a separate web page, so the user fills out field one, clicks next, new page appears with field 2, clicks next etc. It needs a format file and error file for each validated field, a lot of work.

The only other solution I could think of means forgoing FMP database validation, and using a calculation field that checks the entered value and generates the appropriate response. Only problem is that if the values aren't really being validated, so the database could end up with dud information in it. (Solve by having another calc field to mark when everything is OK?)

Link to comment
Share on other sites

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