Redirect after save

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 3, 2012   (RSS)

Re: [pothompson] Redirect after save

By (Deleted User) - February 1, 2012

Hi Paul,

In order to set the previous url you need to add the variable 'return_url=' with the previous query html encoded as the value.

In your HTML separator, where you have the link to create a new record added, try the following:
$current_query = htmlspecialchars($_SERVER['QUERY_STRING']);

$link = [current link]&returnUrl=$current_query;


The above is just an example, you'll need to tweak it to fit your code. The important bit is grabbing the current page view query ($_SERVER['QUERY_STRING']) and adding it to the end of the link so that it's passed in the URL.

Hope this helps,

Tom

Re: [Tom P] Redirect after save - Related Records

By pothompson - February 3, 2012

Thanks Tom, that's exactly what I wanted.

For anybody else that's interested, here's another great response of how to add a 'Create' button for a Related Records field which can then be used with Tom's suggestion:

http://www.interactivetools.com/iforum/P78970#78970