Kirk Hofer’s Blog

June 12, 2009

InfoPath Multi Column Drop Down

Filed under: Uncategorized — Tags: , — kirkhofer @ 2:22 pm

If you need to add a drop-down to an InfoPath form that has a Display Name with multiple columns, you can’t do this out of the box.  In order to make this work, you have to manually edit the XSL behind the scenes.  I don’t believe in adding code behind if you don’t need to but the XSL does not make this form need a Full Trust or anything, so this seems cleaner.

Save your InfoPath form File -> Save As Source Files…  From there go in and edit the view1.xsl or whatever you named your view.  Look for the <option> tags and in there you will find the <xsl:value-of/> tag with the field you chose in the display name.  Now, just add the additional stuff you want, and whala:

<xsl:value-of select="@field1"/>-<xsl:value-of select="@field2"/>

Save the file and open the manifest.xsf in Design mode and take a look

Advertisement

1 Comment »

  1. Thanks…This works like a charm….

    Comment by Mahinder — January 9, 2011 @ 2:49 pm


RSS feed for comments on this post. TrackBack URI

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 )

Connecting to %s

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.