• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Return URL and keep thank you message

Return URL and keep thank you message 9 years 2 months ago #34167

  • mjbigo
  • mjbigo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hi,
I am trying to set up the return url to the same page the form is placed in but I also wants to display the thank you message.

The problem I am having is my form is placed at the bottom of the page and after the form submission it reloads at the top of the page and the user has to scroll all the way down to see the thank you message.

So in the form property, php script, in the thank you php script I wrote this:
$mainframe->redirect($_SERVER["HTTP_REFERER"].'#userForm');

Which works, with the exception that the thank you message no longer display.

So how can I use the return url option and retain the thank you message as well.
The administrator has disabled public write access.

Return URL and keep thank you message 9 years 2 months ago #34208

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

You don't need a return URL to automatically navigate to where your form is placed. You can try using a JavaScript with an anchor. For example, a similar as the following snippet can be used in the Thank You Message body (if you're using an editor, switch to the view source code in order to place the JavaScript/HTML).
<script type="text/javascript">
window.onload = function(){
window.location.replace(window.location.href+'#anchor');
};
</script>
<p><a name="anchor"></a></p>
<p>This is actual Thank You Message text here.</p>

PS: Some editors might strip part of the code - under such circumstances, either adjust your editor options (if any) or temporarily disable the editor (via Global Configuration) while implementing this.
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!