InfoPath Form Services- Hide Data Validation ScreenTip

How annoying is that yellow box that pops up and covers the field you are trying to enter information into when filling out a browser-enabled InfoPath form?

large_errordiv

The irony is that it is telling you that the field is mandatory, or some such thing, but it is preventing you from completing the bl*#dy thing. So here are some nifty tricks to make it less intrusive or get rid of the thing once and for all:

Method 1 (keep it down yellow box)

In the hive directory under TEMPLATE\LAYOUTS\INC is a css file called ifsmain.css. Make a copy of this file and then edit the original. Find the .errorDiv class and go to town. I made these changes which saw the yellow box being a lot less in my face and annoying:

width:150px; padding:0; font-size:xx-small;

small_errordiv

Remember, this change will effect ALL browser-enabled forms so ask before you go modifying the css

Method 2 (Gorn Get)

You can do follow this post: http://wssdev.blogspot.com/2007/06/infopath-remove-validation-popup.html which will basically have you can save your form As Source Files and edit the manifest.xsf to replace all instances of the ScreenTip “shortmessage” attribute value with an empty string “” like so:

<xsf:errorCondition match=”/my:InitForm/my:TypeDetails/my:EmployeeType” expressionContext=”.” expression=”. = &quot;&quot;”>
   <xsf:errorMessage type=”modeless” shortMessage=””></xsf:errorMessage>
  </xsf:errorCondition>

This solution will get rid of the screentips all together when viewed in a browser, although when viewed in the InfoPath client the screentip will display: “Unspecified Data Validation Error”.  Another possible deterent from using taking this approach is that, in some cases, the change stops the red asterisks from appearing in the field when a validation condition is breached. If you submit the form with a breach the form will complain but this isn’t very user friendly.

Advertisements

One thought on “InfoPath Form Services- Hide Data Validation ScreenTip

  1. Very useful article which pointed me in the right direction to resolve an issue that was very unpopular with our users.

    I also found that the possible deterent that you mention of the red asterisk not appearing is caused by Infopath not recognising that there is a validation message. I was able to correct this by adding a value to the xsf:errorMessage element. This becomes the DetailMessage property instead of the Message property in Infopaths error collection and therefore the red asterisk appears.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s