Answered by:
Redirecting users to a different URL or SharePoint Home page after submitting InfoPath Form

Question
-
Hi
I have an Infopath form containing 4 Views. On the last view of the form there is a button with Action:Submit in/with properties:
“After submit: Close the form”.
If a user adds a new item, then clicks the “Submit” button the new item gets added into the SharePoint List and it gets directed to the List containing the new item.
We do not want the user to see the list. We would rather the user to be redirected to the main SharePoint home page.
Is there a workaround for that?
Thanks
haltindag
Answers
-
You just add it.
Change the link that people click on to this: http://MY_SERVER/ICTServices/Lists/RequisitionForm/Item/newifs.aspx?List=863e8a3f%2D7fba%2D4956%2Da76d%2D608fa96efd64&RootFolder=&Web=9cdaf08e%2Dab85%2D4e33%2Db941%2Dbb9ee43b38e9&Source=http://wherever.com
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force- Marked as answer by Clayton Cobb Tuesday, February 8, 2011 4:52 PM
All replies
-
Then since they are not going to the list to click new, I imagine you are giving them a direct URL to the "new" form, right? If so, then change the Source attribute of that URL to contain the URL of the location where you want them to be sent after closing/submitting the form.
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force -
Hi Clayton,
Thanks for your quick response.
Yes, what I provide the user is a link with an URL I get as follows
Right click the “Add new item” and “copy shortcut” and paste it in the Edit->Link Tools->URL
If the user clicks this link the Form will be opened with 4 views and “Submit” button.
haltindag
-
Hi Clayton
The URL with "Copy Shortcut" from the "add new item"
http://MY_SERVER/ICTServices/_layouts/listform.aspx?PageType=8&ListId={863E8A3F-7FBA-4956-A76D-608FA96EFD64}&RootFolder=
the URL after the form is opened.
http://MY_SERVER/ICTServices/Lists/RequisitionForm/Item/newifs.aspx?List=863e8a3f%2D7fba%2D4956%2Da76d%2D608fa96efd64&RootFolder=&Web=9cdaf08e%2Dab85%2D4e33%2Db941%2Dbb9ee43b38e9
As you can see there is no Source attribute in the URL.Can you say something for that?
Thanks
haltindag
-
Ok...you need to modify the link...
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force -
-
You just add it.
Change the link that people click on to this: http://MY_SERVER/ICTServices/Lists/RequisitionForm/Item/newifs.aspx?List=863e8a3f%2D7fba%2D4956%2Da76d%2D608fa96efd64&RootFolder=&Web=9cdaf08e%2Dab85%2D4e33%2Db941%2Dbb9ee43b38e9&Source=http://wherever.com
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force- Marked as answer by Clayton Cobb Tuesday, February 8, 2011 4:52 PM
-
-
Superb. Please close out the thread if your question is answered. Thanks!
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force- Marked as answer by haltindag Tuesday, February 8, 2011 4:46 PM
- Unmarked as answer by Clayton Cobb Tuesday, February 8, 2011 4:52 PM
- Proposed as answer by BivekNiraula Saturday, May 19, 2012 8:01 AM
- Unproposed as answer by BivekNiraula Saturday, May 19, 2012 8:01 AM
-
Hi Clayton
If we add a new item or edit an existing item in browser and click the “Save ” button in new/edit item mode we come back to the list again.
How can one be redirected to a specific sharepoint site/page (i.e. Home) after clicked the “Save ” button ?
Is there a quick workaround?
Thanks
haltindag
-
Same way as above.
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force -
Hi Clayton,
In my first scenario where user clicks a link to fill out the forms and adds a new item to submit the request and the form is closing and user gets redirected to the e.g. Home-page. With the tips you gave that’s fine no problem at all.
In the second scenario:
Because user added a new item into the list already, in case user’s request is rejected, we send the link to the list in sharepoint
http://myserver/list/myRequest/AllItems.aspx list default view with items and “Add new item” link.
Here user can make some changes by ticking the item, editing and if finished, clicking on the SAVE button.
After clicking SAVE button we want user to get redirected to the i.e. Home-page as we do in the scenario 1 above.
If we use the url with Source=… it opens the form for a NEW item and we can add a new item and click Save button but it’s landing back in the default view of the list
http://myserver/list/myRequest/AllItems.aspx. That’s not what we want.
In brief; user ticks the item in the default view of the list, edits item and clicks Save button; After Save user should be redirected to the e.g Home-page.
I hope I could explain my scenario and you can have a workaround.
Thanks
haltindag
-
- Go to the form
- Change the URL to http://MY_SERVER/ICTServices/Lists/RequisitionForm/Item/newifs.aspx?Form=863e8a3f%2D7fba%2D4956%2Da76d%2D608fa96efd64&RootFolder=&Web=9cdaf08e%2Dab85%2D4e33%2Db941%2Dbb9ee43b38e9&Source=http://wherever.com
- When linking the URL, use the URL above after switching out the placeholders...It will direct users to the homepage after saving the Form!!
-
For those of us who are novices are we talking about going to the SharePoint Form libary settings? Is this a function of InfoPath?Is this true for the 2010 products? Please give a detailed description of "Just go to the form and change the URL". Where and how does this take place?
- Edited by PingRob Monday, January 30, 2012 7:21 PM mis spelling
-
Hi PingRob,
Go to the form in your browser. To have users be redirected to the homepage all you have to do is replace the current url in the address bar with this URL - http://MY_SERVER/Lists/FormName/FileName.aspx?
Form=863e8a3f%2D7fba%2D4956%2Da76d%2D608fa96efd64&RootFolder=&Web=9cdaf08e%2Dab85%2D4e33%2Db941%2Dbb9ee43b38e9&Source=http://wherever.com
The orange text is the important part. This orange text needs to be replaced with what was after "/FileName.aspx?" when you first went to the form. Once you replace the url in the address bar, copy the URL and everywhere on your site where you link to the form, use that new url.
-
If I am referring to a current form in an email message from a SharePoint Designer workflow as a link to open a current form, how do I incorporate the above addition (in orange) to the link when there is no link to start with. I used your link information above in the SharePoint link for the form and it works beautifully!<input id="1fbf4944-e591-4137-a2bf-55053c5fc4cd_attachments" type="hidden" />
-
i am changing the url like below:
but it does not redirect, instead i am getting a message that "form was submitted successfully" Please suggest.