Skip to content

Recently I was trying to build an InfoPath form — with the help of a form designer – -and we stumbled across a pattern that might be obvious for some, but it involves using multiple controls connected to the same spot in the in the data source. For instance, let’s say that you have a city field but you want to help the users fill out the popular cities — but new cities and towns are popping up so you don’t want to have to have an up to date list. So you can do something like this:

You have a drop down list for the cities you know — if they start typing InfoPath will start to locate the city. If they don’t find what they want, they can select an entry from the list, OTHER (Specify). This (because of conditional formatting) will reveal the text box — which is connected to the same spot in the data source. So here’s what happens when they select OTHER (Specify). When they select it the secondary textbox shows up. When they type the value in and exit the field the property is copied into the data source and the conditional formatting for the text field will hide it again (since it doesn’t say OTHER (Specify) any longer). And the drop down list will show the new value.

There is a problem with this approach. It only works for drop down lists that are based on a secondary data source not those where the values have been entered directly into the control. However, worst case you can base the drop down list on an embedded resource.

1 Comment

  1. Hi, Can you send me the sample xsn file for this


Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share this: