I have created one custom new form of a list in which I want to redirect the user to other page after saving item.
I have placed <input>
button to save the item and set the __redirect
attribute to my custom page in Pages
library. My site url is like, <sitecollection>/Pages/Page.aspx
for e.x., http://xxx/sites/web/Pages/Page.aspx
.
My HTML code in CustomNewForm.aspx
is:
<input type="button"
value="Save"
onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/Pages/Test.aspx}')}" />
But when press save button it redirects me to http://xxx/Pages/Test.aspx
rather than http://<sitecollection/site/web/Pages/Test.aspx
What should I do?