XmlFormView and conditional submissions - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

XmlFormView and conditional submissions

Last post 09-04-2007 06:36 AM by eeyore145. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-01-2007 10:35 PM

    XmlFormView and conditional submissions

    Hello all this is my first post in the forum:

    I have come across a problem that seems to have no solution.  I am under a tight deadline and I am looking for any potential way to accomplish what I need.  This is the current situation.

     We are using InfoPath 2007 Forms Server and MOSS 2007.  For the current project I am on, we are leveraging the XmlFormView to display infopath documents in a SharePoint site.  This works great besides one problem.  One of the requirements is to view the ORIGINAL document and the current document (the form library has versioning enabled, etc.).

    As you can probably imagine when the end user views the original document I do not want the save button and submit button to appear.  I do need to use the view functionality (there are several different views in the InfoPath document) and the other components of the XMLFormView control.

     I have figured out how to use the EditingStatus and XMLLocation properties of the control to render different InfoPath documents based on the end user's selection. Also, through the Options property of the XMLFormView control I can disable the save and save as buttons via the "DisableSave" value. But what I have not been able to figure out is how to disable or hide the submit button when the end user is viewing the "original" version of the form.  This needs to be in read only format.

    1) By browsing through google groups and the internet I see references to using conditional formatting.  But this is a massive form and I can't conditionally make every field read only and this still doesn't address the issue of disabling or hiding the actual "submit" button in the XmlFormView toolbar.

    2) I don't have the option of going through the tools menu to manually turn off the submission characteristics.  Basically, the core xsn template should allow for this behavior, but through programmatic means we move the "original" document to a seperate document library.  Then the XmlFormView control will show the "current" document from the active document library, or the "original" document from the secondary document library.

    Does anyone have any idea how to disable or hide the submit button of the XmlFormView control?  Or how to set up a rule that disables the actual default submit button within the InfoPath form?  I have no problem creating a rule in the template (such as using a secondary xml file as a datasource and somehow using that to turn off submission ability) and using an XMLNavigator to switch the read only properties, etc...but I can't find a way to do it via this means either.

    Also, at this stage in the project I can't create my own submit button, we need to use the default capabilities of InfoPath, but I can't find any way to disable or hide the submit button.

    Does anyone have any ideas, even if involves thinking "outside of the box"?

    Thanks in advance

    MK

  • 09-03-2007 11:33 PM In reply to

    Re: XmlFormView and conditional submissions

    One idea would be to set your submit to "perform custom action using Code". It's a bit more work and if your current template has no code deployment will become that much harder. However when you submit using code you can cancel submit based on some conditions, namely the ones you have.

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 09-04-2007 06:36 AM In reply to

    Re: XmlFormView and conditional submissions

    Thanks for the suggestion.  I actually came to that conclusion myself (thought about writing code in the InfoPath object itself) but we decided against that route because of potential deployment problems.  Instead, I have actually created a "read only" template or basically we now migrate InfoPath documents into a 'read only" folder when the original document is requested.  Therefore, the XmlFormView will just pick up the save and submit status of the underlying form and that works great.

     Thanks for the feedback.

     MK

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.