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.

Required Value Error Customization?

Featured Replies

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

My first thought was JavaScript

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


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

  • 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?)

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.