We have a form for internal use where we want to be sure the contact person is providing us an email address that ends with @ncdenr.gov. Is there a way to check for a specific email address or to do a lookup from our eads system?
Question
Question
Answer
Beverly, if you are like us and don't have the latest version of Forms yet (we are still on 10.1), you can use the following code in the CSS Section to add your text AFTER or BEFORE the error message. This is a field I used an 'errorField' classname in:
.errorField p.ws-errormessage::after {
content:"---This is not an ncdenr.gov email address";
}
Replies
If you use a single line field instead of an "Email" field, you could use a regular expression under the advanced tab to validate the address.
Just as a simple example, the following would look for one or characters followed by "@ncdenr.gov"
^.*[@ncdenr.gov]$
If you have Forms Professional and can set up your other system as a data source in Forms (SQL or ODBC), then you should be able to do a lookup as well.
Thank you for your help. It worked great. Now to the next item with this. When the error comes up, how to I adjust the error message to say, "this is not an ncdenr.gov email address"?
You can configure an error message for that field in the Error Messages tab. Just type your error message under Display, select Regular expression does not match under When, select These individual field(s) under For, and select the field you want the message to display for.
Beverly, if you are like us and don't have the latest version of Forms yet (we are still on 10.1), you can use the following code in the CSS Section to add your text AFTER or BEFORE the error message. This is a field I used an 'errorField' classname in:
.errorField p.ws-errormessage::after {
content:"---This is not an ncdenr.gov email address";
}