0

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.

0

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>


2
  • I tried this. The re-direct worked using the default new item form. When I tried to put that form into a blank .aspx page via SPD it just resets – Daryl Jan 25 at 23:59
  • Actually nevermind, this worked perfectly. Thank You!!! – Daryl Jan 26 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.