This project has moved and is read-only. For the latest updates, please go here.

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

Sep 6, 2011 at 1: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 3: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 3:01 AM
Edited Sep 8, 2011 at 3:02 AM

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

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

I used the ?source=YourURL to sort this: