Stump the Panel » Site Managers and Site Collection Managers

Force Open .xml InfoPath in Browser

(10 posts)
  • Started 3 months ago by erugalatha
  • Latest reply from Samer
  1. erugalatha
    Member

    Hello.

    I have the following scenario:
    .xsn file uploaded in central admin and is available at site collection level as a master template on a form library.
    Site managers create .xml templates in this form library using the .xsn as the master form.

    I then create Content Types for these .xml files and point the content type to the .xml files.

    PROBLEM:
    On Form Libraries in sub-sites the forms will not open in the browser ... they require InfoPath client.

    I have made all the correct settings in Central Admin to Render browser forms but the forms in form libraries where the content type points at an .XML file all will NOT open in the browser.
    I have also set the "Display in web browser" option within the form library but this does not work.

    How do I force them to open in the browser?

    Thanks for your help.

    Posted 3 months ago #
  2. erugalatha
    Member

    anyone? I really need some help on this.

    The "Display as a Web Page" does not seem to work.

    Posted 3 months ago #
  3. There are some settings you need to make in the InfoPath form as well. Did you do those?

    Posted 3 months ago #
  4. erugalatha
    Member

    Yup, the form works in Forms Services in a Form Library that I've created at the Site Collection level. I can open the form and it pulls in data from data connections and I then save the form as a .xml file into that Form Library.

    I then use that .xml file to create a Content Type.

    In a sub site I created a Form Library and set the Management of Content Types on and the "Display as a Web Page" is turned on.

    When I choose New -> My Form in the Form Library it starts up InfoPath Client. I tried it on a computer without InfoPath installed and it throws a message saying that "Internet Explorer 6.0 or higher is required or a Windows Shared Services XML Viewer is required".

    I am stumped as to what use the "Display as a Web Page" functionality does as it does not work reliably.

    Posted 3 months ago #
  5. No, I mean inside InfoPath, you have to set it for web compatibility mode or something. Did you pass all the compatibility tests?

    Posted 3 months ago #
  6. erugalatha
    Member

    Yep, it passes all the browser form tests and it actually loads fine in the form library. The problem is when I create .xml files from it and make those .xml files into Content Types and try to reuse them.

    Then it no workie.

    Posted 3 months ago #
  7. jaxkookie
    Member

    I do not use a form server or MOSS, but I had a similar requirement. I have to make to changes to the template. First I needed to save the template as Source files. In the template file I needed to add a link to the xsl page, mine was a preview.xsl
    '<?xml-stylesheet type="text/xsl" href="/site/olr/Forms/Preview.xsl"?>' the path can be where ever you want to store it and to which ever view you choose, that file will need to be uploaded. Once a batch of files have been created in SP I do a find and replace and comment out the line of code that displays the file as an InfoPath form.
    '<?mso-application progid="InfoPath.Document"?>'
    '<!-- <?mso-application progid="InfoPath.Document"?> -->'
    the form will open in the browser by default, in SP the menu still provides a way to open in InfoPath. This is only a work around and not the best solution, but it fit the needs I had. Good luck

    Posted 3 months ago #
  8. jaxkookie
    Member

    last item, once changes are made to the template.xml file, adding link to xsl, the manifest.xsf is the file you open in design mode and publish for changes to take

    Posted 3 months ago #
  9. erugalatha
    Member

    Thanks jaxkookie you gave me an idea. This is not end user stuff I'm describing here but non-end users who read this website might find it beneficial.

    Here is how I solved my problem:

    1. Created a Master Form (this is a .xsn) in Visual Studio which is uploaded and published through Central Administration by the SharePoint Admin.
    2. Created a Master Content Type which points at the Master From .xsn uploaded in previous step.
    3. Users use this form in a Form Library at the top level of the Site Collection. In this case they add questions to a repeating table and save the form. The form is saved as a .xml file into the Form Library.
    4. My requirement is to take each of those .xml files created by users (Site Managers) and make them into Content Types for reuse at lower level sites. These are dynamic form templates created by Site Managers for use by users.
    5. By default it seems the Content Type pointing to a .xml file will ALWAYS try to open in InfoPath. If I remove the <?mso-application progid="InfoPath.Document"?> line it is then just an ordinary .xml file and will open in the browser but will have none of the functionality that is built into the .xsn e.g. dropdowns, buttons etc.
    6. So I copied the XML from the .xml templates created by managers and in Visual Studio I replaced what was in the template.xml with this copied XML.
    7. Then I created the .xsn's (calling each a different name for each type of template that is required). Now each .xsn has a different set of questions.
    8. Created the corresponding set of Content Types for each .xsn.
    9. Attached the Content Types to my form library at lower level site.

    Now I have an (almost) dynamic set of Forms that can be constructed by Site Managers and reused.

    oh happy day. :)

    Posted 3 months ago #
  10. Samer
    Member

    I have the same Problem, im stick in this problem
    first i created a form library and publish it as content type i add site coulmns to it
    then i added some code on the same form (on load_event) and republish it with full trust and assigned certificate as administratrator (advance).
    the Form library sitting configured to be web enabled and allowing content types , Central administration is confihured correctly.
    im sure everything is configured to be web-enabled but when i select new form from the form librar the file opens as .xsn not web
    what the problem?
    how can i make info path web enabled always

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.