2

I have created a form using InfoPath in SharePoint 2010 with a custom Save button for saving. The Save button on ribbon has been disabled. When there any validation errors I get this message:

The form cannot be submitted because it contains validation errors. Errors are marked with either a red asterisk (required fields) or a red, dashed border (invalid values).

Field or group: my:My_x0020_Field Error: Please enter My Field.

Click OK to resume filling out the form. You may want to check your form data for errors.

My validation error message is only Please enter My Field., but it gets lost in all the jargon that SharePoint spits out (if this message does not come from SharePoint then do tell me where it comes from).

How can this message be suppressed or modified? I just want my field's validation message to be displayed. Is it possible?

1 Answer 1

1

I had the same problem and could not find a good workaround, although I'm sure there is one out there. What I settled on is a rule on my save button that checks to see if my requiered field is blank and stops the button from running any further if it is, then I created my own "Field x is a requierd field" message.

A quick step by step:

Click on your save button.

Click [Properties] on the ribbon, and then [Manage Rules].

Click [New] to add a new rule, select [Action] then name is something useful like RequieredFieldCheck.

Click on the condition to bring up the condition window and select your required field, and the option "is blank".

Then click [Add] under the run these actions and create some way to inform your user that they can't save the document because they haven't field in a required field, this could be a pop up window (lots of tutorials out there) or just a big red text box next to the save button.

Make sure the tick box "don't run the remaining rules if the conditions for this rule are met" is ticked and that the rule is above your submit data rule (you can change the order of the rules by right clicking them).

Make a new rule like this for each box that is a required field (for multiselection boxes because they always contain the blank value you'll have to be more creative).

This stops the save before that message is displayed and allows you to create your own pretty warning.

Good luck!

2
  • Thanks Ryan. This is the same approach that we had to do. But with 30+ fields on your form it becomes a real mess. That's why I was looking for a less cumbersome way to do it.
    – Naveen
    Jan 22, 2014 at 7:38
  • I hadn't thought of this, but was just googling ways to get change that annoying standard infopath popup window. This is a great idea, I'll use. thanks!
    – russds
    Jun 25, 2015 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.