You may also be interested in: SharePoint training by SharePoint911
Editor's note: Contributor Chris Grist is a Senior Technical Consultant for Loftus IT. Follow him @gristdog
This week I have been building a largish InfoPath form. One of the
requirements from the client was to let the user know that the form had
been submitted successfully.
You can do this pretty easily with InfoPath using the built in submit to data connection:
However, I wanted something a bit more customisable than the
standard pop-up, I also wanted to use the same data connection for
several buttons, but some would allow the user to continue working such
as a
Save button, I did not want any message to
display interrupting their progress, but I still wanted the form
submitted, as per my SharePoint submit connection.
Therefore the solution I went ahead with was a “Thank You View”.
The first step is to create your form, with your submit button. For
this example I won’t be using the actual form developed for the project
just an example, it looks like the following:
Once this is complete you need to setup a new data connection by going to
Data -> Submit Options and complete the dialogue as needed.
The next step is to create a new view to do this go to
Page Design -> New View I have called this view thankYou.
To this I have added a button called
Close as shown below.
Now it’s time to go back to your fill out view, select the Submit button and from the ribbon select
Manage Rules. The rules sidebar will open up, select
New then selection
Action.
Select
Add and then
Submit Data this will show you the list of your data connections to choose from, make sure the correct one is selected and click
OK.
Select
Add again and this time select
Switch Views, from the dialogue that appears select the
thankYou view.
Finally switch over to your thankYou view, select the
Close button and in the Rules panel click
New -> Action this time when you click
Add select
Close the form and you’re done.
You now should have an operational form that switches when it’s
submitted and then presents the ThankYou view, in case you get stuck I
have linked a copy of the .xsn below. In the example I have removed the
submit data connection, so you will want to add your own in for
testing.
Download:
Thank You View Example
No comments:
Post a Comment