Custom List Forms and Redirecting after Update
// July 29th, 2008 // Sharepoint
One of my clients required a custom edit form for their editing screen where it would show certain fields and then redirect to a new page after the OK button was clicked. I had done this before at another client except i’d never found a way to actually redirect the page after the save. Here is an article on how to do that to.
1. In Sharepoint Designer take your EditForm.aspx and copy it.
2. Rename it
3. Open this new form and click on the PlaceHolderMain (leave your ListFormWebPart on the page)
4. In the ListFormWebPart scroll down the properties in the xml which describes the webpart and change
4. Click on Insert->Sharepoint Controls->Custom List Form
5. Choose the appropriate List and select Edit Form
6. Sharepoint generates the form for you.
To customize the save button, find the following control on the page Sharepoint:SaveButton
1. Delete the SaveButton
3. This button allows the form to be saved and redirects to back to that page. See this article for more info
Hope it helps!
If you wish to update after redirecting this is how i did it:
ParameterBinding Name=”Source” Location=”QueryString(Source)”
to your paramterbindings list then add
xsl:param name=”Source”>0 /xsl:param>
xsl:variable name=”RedirectLoc”> xsl:value-of select=”$Source”/> /xsl:variable>
to your stylesheet
then the button should be: