SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When search results on SharePoint include InfoPath 2010 forms, the default link is directly to the .XML file. By default, the browser attempts to open in the form in the form filler. The results also include a "View in Browser" link at the bottom, but it's practical hidden and does not stand out.

Is there a way to alter the search results so that "View in Browser" becomes the default link for all Infopath forms?

share|improve this question
up vote 1 down vote accepted

Search Results are rendered using XSLT. I don't have a specific example for your problem, but it should not be rocket science to figure out how to do what you want.

Here is a link on how to access and customize the search results Xslt:

There are a lot of other blog posts on this common issue if you Bing it :)

share|improve this answer

In the XSL editor, find the line that reads <xsl:variable name=”url” select=”url”> and replace it with the following snippet:

<xsl:variable name="url">
    <xsl:when test="contentclass='STS_ListItem_XMLForm'">
      <xsl:value-of select="sitename"/>
      <xsl:value-of select="url"/>
      <xsl:value-of select="url"/>

as per

share|improve this answer

may i know how you are able to get InfoPath forms in search results. we need to configure any extra in Search service? i am not able to get search results when my Form contains the search keyword. please advice what needs to be done. thanks in advance.

share|improve this answer

Your Answer


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.