Sharepoint List redirect with new id
- by TheRealQuagmire
I have a list within Sharepoint, using a custom new form i have added a custom list form control ("New item form" for the list) and changed the SaveButton to a standard input HTML button, and added an 'onclick' event that is as follows:
onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={NewFormWizard2.aspx?id=}')}"
this works as in saves the data and redirects to the NewFormWizard2.aspx?id= page.
the question is how do i get the ID of the created item to be passed to the redirected page?
thus once the form is completed it would redirect to NewFormWizard2.aspx?id=23
Thanks in advanced.