Redirect to Edit form after Saving New Form
Posted: 15 Nov 2017
It appears that the following code (which allows a user to be directed to the edit form of a newly created item) only works if the list does not contain any folders.
fd.onsubmit(function() {
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Item_EditForm.aspx?ID=');
fd.sourceFormParam(uri);
return true;
});
If, however, the list contains a folder, the above code will take the user to the edit form of the first folder visible in the list and not to the edit form of the newly created item. Any thoughts how this can be addressed via JavaScript? Thanks!
fd.onsubmit(function() {
var uri = fd.setUrlParam(decodeURIComponent(window.location.href), 'FDRedirectWithID', 'fd_Item_EditForm.aspx?ID=');
fd.sourceFormParam(uri);
return true;
});
If, however, the list contains a folder, the above code will take the user to the edit form of the first folder visible in the list and not to the edit form of the newly created item. Any thoughts how this can be addressed via JavaScript? Thanks!