After creating my InfoPath form and setting it to publish to a Forms Library in SharePoint 2010, I found that I wanted to fine tune the experience that the user has when submitting a form.
The first thing to change was the annoying dialog asking the user for a filename. Many users will have no idea what SharePoint is asking them for, or worse, they enter a name that’s already used by another form (and either overwriting it or getting an error).
To see what I mean, simply create an InfoPath 2010 form and set it to publish to a SharePoint 2010 Form Library. It doesn’t matter what fields and columns there are.
Now, click on Add Document in the form library and you should see your form, something like this:
Fill out your form and then click the “Close” button – which isn’t obvious for end users.
Although probably confused, end users will most likely pick “Yes” here.
The next dialog is really confusing:
SharePoint is asking for the filename to save the form as in the Form Library. However, unlike a more standard save dialog, this one doesn’t let you see what the existing files are named, so the users are given very few clues as what is expected.
Instead of asking our end users these questions, we can just setup a formula that will automatically determine the filename.
First, either create an InfoPath form that publishes to a SharePoint library or open one you’ve already created. Next, in InfoPath, go to the File menu (backstage) and select Info, and then click on “Submit Options”:
On the Submit Form drop down menu, select “Submit Options”:
The Submit Options dialog window will appear.
· Check the box to “Allow users to submit this form”
· Under “Send form data to a single destination”, choose “SharePoint document library”
· Click the “Add…” button in the “Choose a data connection for submit” area
o Enter the address for the document library
o And here’s what we’ve been looking for: a place to enter a formula that will create the filename for the users – enter what you want here. Remember, you can use a field on the form as well as other variables (such as date and/or time)
o Also, select if you want to allow your users overwrite a form that’s already been submitted
o Click Next
o Click Finish
· Now click Advanced, so more options are displayed
o Under advanced, you can select if you want to display a message if there’s an error and/or if the submit was successful
o You can also choose what to do from there – Close the form, Open a new one, or Leave the current one open
Publish the form and now you should see something like this when you create a new form to submit:
Notice the buttons in the ribbon – there’s now a “Submit” button, along with the default buttons. That’s better, but it’s not quite what I want.
So, open the form back up in InfoPath Designer, and go to the File menu (backstage), select Info, and then click on Form Options at the bottom:
In the Form Options window, the first set of choices is for the form in a Web Browser:
Here is where you can set which buttons to display in the ribbon. Make any changes you want, click, and then Publish the form.
If you don’t want to use the ribbon at all, you can add a button to the form and set it to be the submit button.