Out of the box, I've noticed the following user experience in SharePoint 2007:
- User navigates to a list.
- User opens list item for display.
- User selects "Edit Item" link.
- User changes the list item, presses Submit.
- User is redirected back to list.
Is it possible to change the last step so the user is redirected back to the list item display form? If s开发者_高级运维o, how is it done?
You can create a custom form by with SharePoint Designer then customize the OK Button to save and redirect to the display view. To create custom edit form using SharePoint Designer here is a full instructions on how to do thi http://office.microsoft.com/en-ca/sharepoint-designer-help/create-a-custom-list-form-HA010119111.aspx
Once you done this then find this line on the source code of you new page
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:variable name="dvt_1_automode">0</xsl:variable>
and append this line below
<xsl:param name="ListItemId">0</xsl:param>
"this will make the id of the current item accessible by the button" replace both of your OK buttons
<SharePoint:SaveButton runat="server" ControlMode="Edit" id="savebutton1"/>
whit this one
<input type="button" value="OK" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent(concat('__commit;__redirect={dispform.aspx?id=',$ListItemId,'}'))}" />
Save and test :). You don't necessarily have to replace your OK buttons for this one you can also add this extra button and instead of calling it OK call it something like Save and display and let the user decide what to do (just and idea)
Hope this helps!
精彩评论