locked
Custom InfoPath 2010 control usable in browser forms RRS feed

  • Question

  • Hello all,

    I haven't found any clear answer to this simple question: Can you develop a custom control which can be placed on a browser-enabled (hosted in SharePoint Ent) InfoPath 2010 form?

    One example could be an autocomplete combobox. Put simply: is there an extensibility point in which we can inject any custom HTML markup with a bunch of javascripts on the browser form?

    Friday, April 15, 2011 3:26 PM

Answers

All replies

  • Browser forms don't allow Javascript - only managed code.

    I don't believe there is extensibility for adding custom controls, but I will verify.


    SharePoint Architect || Microsoft MVP || My Blog
    Planet Technologies || SharePoint Task Force

    • Proposed as answer by Sjoukje ZaalMVP Monday, February 6, 2012 1:56 PM
    • Marked as answer by Chris Grist Saturday, February 25, 2012 3:24 AM
    Friday, April 15, 2011 4:00 PM
  • You definitely can't do this with javascript.

    You would be able to add managed code to the browser-enabled form though and then publish the form as a sandboxed solution.

    Monday, April 18, 2011 7:53 AM
  • To clarify what I want to achieve:

    let's say that my user has to choose from 1000s items - you may use a standard DropDown control but you won't do this because the markup of the form would be huge and would perform poorly (and imagine than you have 10 such choices). The common solution in web applications is to provide an "autocomplete" box for this (see Google suggest). For such solution you need to render some HTML markup and some javascript to handle keydown/keyup of the text input element, ajax call to some webservice, etc. So I don't want to manage this by the javascript, I want to place some custom HTML and javascript on the form (be it managed code or whatever else). And ideally - to be a truly resuable solution, it would be nice if all of this were packaged as a control.

    I don't quite understand why custom controls are not possible in the 3rd major version of the InfoPath/Forms services, given that Microsoft usually cares of the extensibility greatly (you can even create custom controls for SQL Server Reporting Services).

    Monday, April 18, 2011 8:50 AM
  • As mentioned i dont think your going to be able to do that directly on the form, possibly with code behind.

     

    Another option may be a custom ASPX application page with the customisation you have described.

    Monday, April 18, 2011 11:35 AM
  • Another option may be a custom ASPX application page with the customisation you have described.


    Do you mean a custom ASPX application page using the XmlFormView control?
    Monday, April 18, 2011 1:47 PM
  • Hi,

    I mean a custom ASP.NET form with the AJAX embedded in the text field as you described.


    Regards, Chris
    Tuesday, April 19, 2011 4:57 AM