Is InfoPath form can be customized with code behind? RRS feed

  • Question

  • Hi,

    I have a development background and used to create forms with .NET (e.g ASP.NET for web application) . Since our company is moving to Sharepoint. I wonder if InfoPath form can be customized and with code behind as I used to do my development work in .NET.

    Basically, I have web pages with a series of input (textbox, dropdown, checkbox...) And the content of a dropdown list might be populated according the the previous selection of the dropdown list. So do the visibility of a control. Or even the whole page would look different depending on the selection of a control from a previous web page.

    Do you think InfoPath can accomplish the same thing? Or I should go back to .NET and do all the design with SharePoint extension?

    Please advice. Thanks in advance.
    • Edited by wkpli Monday, June 1, 2009 3:28 PM
    Monday, June 1, 2009 3:27 PM


  • InfoPath allows you to create drop-downs and other items that can populated from sources external to the form template itself. For example, if you would like to have a drop-down control in your form template, you can have it obtain data from an external data source. See my screenshot:


    As far as having a drop-down that depends upon the selection of another drop-down... this functionality exists. I wasn't sure how to do this, but someone on the forums explained it to me the other day.

    InfoPath allows for multiple views. You can setup views based on user roles (that you setup). You can add individual users, groups, etc.


    You are able to apply plenty of rules and conditional formatting that will allow or disallow controls to be displayed, disabled, hidden, etc.

    I am not sure if InfoPath can accomplish what you are trying to achieve, but hopefully there is a little information in my post that will help you.

    P.S. I highly suggest the book Designing Form for Microsoft Office InfoPath and Form Services 2007 by Scott Roberts and Hagen Green. I just started using InfoPath about 2 months ago with no experience in the application or with coding, and I feel that I can do some pretty awesome things now. I come here almost every day for help when designing form templates. There are a few contributors that always give great feedback if you have questions on how to perform certain actions when developing your form templates.

    P.S.S. As far as code: http://img192.imageshack.us/img192/3636/infopathcode.jpg
    • Edited by SP Brian Monday, June 1, 2009 3:49 PM
    • Marked as answer by wkpli Tuesday, June 2, 2009 12:24 PM
    Monday, June 1, 2009 3:44 PM