This project has moved. For the latest updates, please go here.

Redirect to default.aspx after pressing OK on a New Form

Sep 6, 2011 at 12:12 PM


I have a custom new form which I copied from NewForm.aspx.

When users clicks OK after filling out the details I would like the user to redirected to default.aspx rather than the AllItems view.

Is there a way to do this using SPServices/JQuery/Javascript?

Thanks in advance,


Sep 6, 2011 at 2:03 PM

You don't need script for this at all. Just set the Form Action in SharePoint Designer to do the redirect.

Sep 8, 2011 at 2:01 AM
Edited Sep 8, 2011 at 2:02 AM

Or add a ?Source=YourDesiredURL to the hyperlink that takes you to the NewForm page.

Sep 8, 2011 at 10:52 AM
Thanks for your help.

I used the ?source=YourURL to sort this: