Hi Hans-Henrik Sørensen,
How are you closing the open Nintex form?
There is one option where on the load of the Nintex Form call a JavaScript to append ?Source=<<Search page URL>> to the current window URL. This might cause the page to reload, but works.
Example:
NWF$(document).ready(function () {
window.location.href = window.location.href.split('?')(0]+"?Source=<<search page URL>>"
});
In case you have a button to close the form you can have the same line written on button click event.
The Source query string in the URL indicated where to go when user moves out of the current page.
OR
On after load of the form write the below JavaScript, which will update the From url after page load to include the Source query string :
NWF.FormFiller.Events.RegisterAfterReady(function (){
var oldAction=document.getElementById('aspnetForm').action;
var sourceIndx=oldAction.toLocaleLowerCase().indexOf("source");
var nakedAction=oldAction;
if(sourceIndx>0 )
{
nakedAction=oldAction.substring(0,sourceIndx-1);
}
document.getElementById('aspnetForm').action=nakedAction+"&Source="+ "<<To be redirected page URL>>";
}