Multiple Input Validation Messages on One Web Page

Have you ever been irritated by receiving multiple error messages when trying to save a form on the Web? Wouldn't

it be nice to have just one screen that told you ALL the fields you forgot to fill out? Well, here's one way to do that in R5.

When the user tries to save the document on the Web, it will show them one screen listing all the fields that they must fill out and asks them to go back and change them.


1. On your form properties, check the "Generate HTML for all fields" box.

2. Create a hidden, text, computed for display field called FailHeader at the top of your form with the following value formula:
"<html> <head><title>More Information Needed</title></head> <h2>The following required information was missing.</h2><body>"

3. Create a hidden, text, computed for display field called FailFooter at the top of your form with the following value formula:,
"<h2>Click your \browser's back arrow to return to your document.</h2> </body></html>"

4. Create a hidden, text, computed for display field called FailMsg at the top of your form with the following value formula:
DEFAULT FailMsg:=" ";FailMsg

5. Create a hidden, text, Editable field called FailurePage at the bottom of your form with the following input validation formula:
@If(FailMsg != " "; @Failure(FailHeader + FailMsg + FailFooter); @Success)

6. In each field that you want to validate, put the following input validation formula, changing the message and field name to match your field:
msg:="You must enter the First Name.";
@If(@IsDocBeingSaved & FirstName =""; @If(@BrowserInfo("BrowserType") = "Notes"; @Failure(msg); @Do(@SetField("FailMsg"; FailMsg + "" + msg); @Success)); @Success)

This was first published in November 2000

Dig deeper on Domino Resources - Part 4

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.uk

Close