문제

I am using SharePoint 2013 OP with SharePoint Designer 2013.

I created a Custom List to recieve problem reports. Using SPD 2013 I created a "NewForm.aspx" and used the following code for a redirect to a thank you / confirmation page:

<SharePoint:SaveButton RedirectUrl="http://mysitecollection/Pages/Thank-You.aspx" runat="server" ControlMode="Edit" id="savebutton2"/>

When the user submits the form and hits save, the form resets and clears. It does not actually redirect to the page specified.

Any help would be appreciated. Thanks.

도움이 되었습니까?

해결책

Instead of Server side' Save Button, use the input button and ddwrt:GenFireServerEvent to navigate to the custom page as shown below.

With a custom data validation function(), ValidateData():

<input type="button" id="btnSave" value="Save" onclick="javascript:if( ValiateData() ){ddwrt:GenFireServerEvent(concat('__commit;__redirect={','http://mysitecollection/Pages/Thank-You.aspx','}'))}"></input>

Without a custom data validation function:

<input type="button" id="btnSave" value="Save" onclick="javascript:{ddwrt:GenFireServerEvent(concat('__commit;__redirect={','http://mysitecollection/Pages/Thank-You.aspx','}'))}"></input>


라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top