Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 588
  • Last Modified:

How to submit InfoPath 2007 browser Form to SharePoint(MOSS) library using managed code C#?

Hi InfoPath/SharePoint experts,

I got stuck, anyone can show me a real example in code of how to do this?

Many many thanks!
-Rick
0
RHADMIN
Asked:
RHADMIN
  • 5
  • 3
1 Solution
 
Clay FoxDirector of Business IntegrationCommented:
My question is why?

Submitting to a form library is a straightforward, default data connection, why complicate it with code?
0
 
RHADMINAuthor Commented:
Good question:
I am tryinig to avoid the unfriendly Error msg. generated by InfoPath Form Service when submitted Form has validation error included and being able to customize the Error msg. myself. Actually I'd like to be able to do the validating before having Valid field values submitted to a SharePoint Library using data connection.
Attached is the unfriendly error msg. my users will encounter.
Thanks,
-Rick

infopathWarningMsg.gif
0
 
Clay FoxDirector of Business IntegrationCommented:
Typically I remove the standard validation and just do it myself in rules before the submit action so that I can have more control.

Often I have a hidden section and field which I display error messages, since int he browser you cannot do pop ups.  So if I want to notify the user of issues a red box appears next to the submit button giving them instructions.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
RHADMINAuthor Commented:
Good point, I was thinking doing similar notification to the user either on top of the FORM or bottom of the Submit button as next step. But I realize that you can't prevent the Warning msg. from showing up if the invalid form got submitted by users(they don't like the msg. AT ALL!). That is why I think doing validating and submitting through code on
FormEvents_Submit event can help me solve this problem. But I don't know how to do the validation and submitting through it. NEED HELP!
Thanks,
-Rick
0
 
Clay FoxDirector of Business IntegrationCommented:
Not sure I am following you.

What I am suggesting is removing the required check on the field and then just adding a conditional rule which if the field is blank and possibly looks at other fields or the stage of the form and decides to block submit or notify the user or submit without an issue.

Why won't that work?
0
 
RHADMINAuthor Commented:
Good question: there are some more detail I need to go around with you to explain the conditional rule ALONE can NOT handle(like the Submit button can't be disabled with Rule if the user just enters an invalid email and then click Submit button directly without changing the mouse Focus), or at least can't satisfy the need of a user friendly UI.
I realized that there are way too many limitations imposed on browser form when designing a bit more functional form is needed.
There are gonna be some ways to do the validation and submission through code I believe to be able to circumvent some of these limitations.
Thanks,
-Rick
0
 
RHADMINAuthor Commented:
Doing validation & submission with code only is feasible! It is the solution to eliminate all(almost) error msg. windows of IP.
-Rick
0
 
RHADMINAuthor Commented:
solution found
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now