Default required fields message on submit

T

Tracy H

Is there a way to change the wording for the following message when required
fields are left blank and the user hits the submit button?

"InfoPath cannot submit the form, because it contains validation errors.
Errors are marked with either a red asterisk(required fields) or a red,
dashed border(invalid values)."
 
B

Ben Walters

Hi Tracy,
I don't know of anyway to change this message, however one option to prevent
a user from seeing this message may be to include a section in the form this
section could contain the text "Required information missing, this must be
completed before the form can be submitted"
This section would be displayed based on the value of a field called error
count
you could then add a loading event to the form to check if any errors in the
form exist
c# code

XPathNavigator MainDS = this.CreateNavigator();

MainDS.SelectSingleNode("my:Fields/my:ErrorCount",
this.NamespaceManager).Value = this.Errors.Count.ToString();

You could also disable the submit button based on this rule to prevent the
user submitting.


Hope this helps

Cheers
Ben Walters
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top