Wednesday, May 2, 2012

InfoPath 2010 Creating a Thank You View


Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.
Categories:InfoPath; InfoPath 2010; Site Manager/Power User; MOSS; WSS; 2010

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:
2012-04-10-InfoPath2010ThankYou-01.png
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:
2012-04-10-InfoPath2010ThankYou-02.png
Once this is complete you need to setup a new data connection by going to Data -> Submit Options and complete the dialogue as needed.
2012-04-10-InfoPath2010ThankYou-03.png
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.
2012-04-10-InfoPath2010ThankYou-04.png
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.
2012-04-10-InfoPath2010ThankYou-05.png
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.
2012-04-10-InfoPath2010ThankYou-06.png
Select Add again and this time select Switch Views, from the dialogue that appears select the thankYou view.
2012-04-10-InfoPath2010ThankYou-07.png
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