Redirect Back on form submit 45 PostsJan 4 years ago1TopicHi All,After a lot of searching and experimenting, I found a simple way to redirect a user back to the page he came from on submitting a form. It goes like this:In the configuration of the form set the redirection to Current. Set the task of the button submit to Save or Save & Redirect. Add a field Before Store and a field After Store to the form. Code Before Store: $session = JFactory::getSession();$myuri = $_SERVER['HTTP_REFERER']; $session->set("myuri", $myuri);Code After Store:$session = JFactory::getSession();$config['url'] = $session->get('myuri');That is all!Greetings,Jan 144 PostsMtnPavlas 7 months ago0Level 1Thanks for this - super helpful.For those struggling with this (like I was) - only the 'Save and Redirect' submit button worked (just 'Save' did not).