SharePoint 2013 task approval form redirect to EditFrom from DispFrom
One Click Approval for SharePoint 2013 Tasks:
- 1. Open the task list in SharePoint Designer and create a new List Form
- 2. In the Create New List Form window, set the Filename as “RedirectToEditForm”, the type as Display, and check “Set as the default for the selected type”. Also pick your Workflow Task content type.
- 3. Open the Form in Designer so that the code is displayed, then click the “Advanced Mode” button in the ribbon bar. This will open the entire page for edits.
- 4. Insert the following javascript directly after the line <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"> (this is around line 15)1234567
<script type=
"text/javascript"
>
<!--
var
origUrl = window.location.toString();
var
editUrl = origUrl.replace(
"RedirectToEditForm"
,
"EditForm"
);
window.location = editUrl;
//-->
</script>
- 5. Save the form, accepting the change from the site definition.
Comments
Post a Comment