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?

3 Answers 3


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 :)


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 http://phillyxaml.org/blog/Lists/Posts/Post.aspx?ID=41


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.

Your Answer

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

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