Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Our company wants to create a more user friendly and branded way of handling user errors when validating InfoPath Forms. We would like to create a message box that essentially would be more descriptive for fields that where inputted incorrectly. The clearest way we see going about this adding custom JavaScript. What are some the best ways of going about this?

This is an open ended thread, so I would love to hear any suggestions or advice.

share|improve this question
    
I have a similar requirement and need to replace the standard "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). bla bla yada yada" message with something simpler. The accepted answer on this question is more of an workaround. Isn't it a simpler way of doing this? –  JohnDoDo Jan 3 '12 at 16:57
    
Then you should probably create your own question instead of offering a bounty on an already accepted question. –  PirateEric Jan 5 '12 at 14:08
    
They do seem like very similar questions and since you can't take the bounty back.. looks like we should keep it. :) –  Kit Menke Jan 5 '12 at 17:42
    
@PirateEric: I initially wanted to ask the same question but this question popped up during my searches for a solution. I assumed "closed as exact duplicate" at that time for my question. It made more sense (at least to me) to have this one to everybody's attention and see if it attracts some new answers. –  JohnDoDo Jan 6 '12 at 16:59
add comment

1 Answer

up vote 0 down vote accepted
+100

Instead of the normal validation rules you use in InfoPath, you could simply use rules. In the rule have it use a formula to check to see if the value is in the expected range and then change styles, etc., to show your validation error.

share|improve this answer
    
We actually went with that approach. We created different views as a way for displaying errors. –  Patrick_J Dec 16 '11 at 16:52
    
@Patrick_J: I have a similar requirement and also thought of doing it this way. I even tried but it just seems to much of a hassle. I'm looking for a simpler solution, with no code written (I managed so far to keep my forms clean, only with rules and XPath conditions). I hope you don't mind but I added a bounty to your question and see what that pops up. –  JohnDoDo Jan 3 '12 at 17:01
    
Sounds good, our requirements where not to extend the form by means of custom code, in other words no code behind. –  Patrick_J Jan 5 '12 at 14:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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