combobox in infoPath

R

Rohit

Hi Everybody,

I want to use a use a combo box on my Infopath form. It will have a
pre-populated list of items that a user can choose from, or the user can type
in his own item.

This combo box will be pre-populated from either a xml file, or database.

What are my options?

Thanks,
Rohit
 
S

Scott Roberts [MSFT]

Rohit,



InfoPath has a dropdown control but not a native ComboBox control. Here is
a way that you can simulate this behavior. It will allow you to mimic the
combo box functionality with built-in InfoPath controls:



1. Insert your dropdown bound to your field and add an option with a
value like : "Please Specify" as well as your other options

2. Insert a text box that is bound to the same field

3. Add some conditional formatting that will hide the text box if it is
a known value in the dropdown (besides for "Please Specify")

4. Add conditional formatting on the dropdown to hide when the value is
not empty and not a known combo value

This way, when "Please Specify" is chosen you will see the text box and not
the dropdown. If you empty the text box (and tab away) you will get the
dropdown again.

- Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top