I’m trying to find a way to get a form opened in the InfoPath client to submit back into the same SharePoint library from where the user clicked “New” to create it. I’d like to calculate this value in the code-behind on the form (as opposed to using static or named data connections) because I don’t know all the libraries where the form will be used. The idea is to set things up so that contributors of various sub-sites can create a Form Library, set the default content type to be this published InfoPath form. Then users should be able to create new instances of the form with the “New” library tool bar option, fill out the form in the InfoPath client (so they can use spell checking), then when they click submit a new instance of the form will be created back into the same library from where they click New. It seems that in our case the form has to be published to the site collection through the central admin and uploaded by the administrator and used as a site content type in order to allow the form to be opened in the browser when the client is not available. This is a requirement in our case. Too bad IE doesn’t provide spellchecking like FireFox or else we would open the form in the browser only and use the default input parameters.