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