Redirect to Display Form after Saving (the generic way)
Posted: 21 Jun 2018
Hi,
is it possible to build some generic function for the redirect to the display form after editing an element?
Something like in documentation:
But here it has the "fd_Item_Edit.aspx". How to build it to be dynamicly to the content type (e.g. "fd_Contact_Display", "fd_Request_Display.aspx").
Or maybe it is possible to place a string inside the "general" option for the form, redirecting to the display form.
Right now i've build this:
But this only works good in edit-form, to redirect to display form.
If i us this code in new-form, i'll receive an error...
is it possible to build some generic function for the redirect to the display form after editing an element?
Something like in documentation:
Code: Select all
fd.setUrlParam(window.location.href, 'FDRedirectWithID', 'fd_Item_Edit.aspx?ID=');
Or maybe it is possible to place a string inside the "general" option for the form, redirecting to the display form.
Right now i've build this:
Code: Select all
fd.onsubmit(function() {
fd.sourceFormParam(document.referrer);
return true;
});
If i us this code in new-form, i'll receive an error...