Pergunta

I had a Combobox (lookup) in an infopath form. I tried to get the value from the lookup by the auto suggestion method. But it does not work. Does anyone know how to implement the filter-while-user-typing, using only an infopath form. Thanks in advance

Foi útil?

Solução

This cannot be done without code. If you can only use native InfoPath, there is no type-ahead functionality for combo-box or drop-downs.

If this is a list form, you will not be able to use code behind at all. You may get some traction with a JavaScript approach. Start with this blog post that explains the process using Marc Anderson's SPServices on the web page where the form displays:

http://butdoesitwork.typepad.com/but_does_it_work/2011/08/infopath-and-autocomplete-and-other-lessons.html

Outras dicas

I just saw this post. I wrote the entry http://butdoesitwork.typepad.com/but_does_it_work/2011/08/infopath-and-autocomplete-and-other-lessons.html. I just wanted to say that it is possible to do so with lists as well. It turns out there is a sneaky way to add JavaScript to a list's infopath form. You are probably accustomed to seeing the list box in a light box.

Go ahead and turn the light box off for a moment. To do this, go to the advanced settings, then the very last choice is whether you want the form to open as dialog. Pick "NO."

Once you do this, you can open the infopath form inside of SharePoint, instead of a light box. Once you have done this, you can edit the page, and add a content editor web part. Use the content editor web part to add you jQuery code.

When you are done, turn on the dialog option again.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top