How to reload page when submit a form by OverlayTrigger

starvnnet

Member
Sorry for my bad english.
I have a question:
In my template, have a link with class="OverlayTrigger"
Code:
<a href="link_to_form" class="OverlayTrigger" ...

My form
Code:
<form action="{xen:link 'starvnnet/save'}" method="post" class="xenForm formOverlay AutoValidator" data-redirect="on">

My Controller
Code:
.....
//$link = 'index.php';
return $this->responseRedirect( XenForo_ControllerResponse_Redirect::SUCCESS,$link, new XenForo_Phrase('starvnnet_save_success'));

Everything work well and when i submit my form, it will redirect to index.php
Now i dont want to redirect to index.php. I want to reload only.

Can you help me?
 
Last edited:
I hope you can understand this. Return to the route prefix for the page you want to reload. Be sure to set the viewParams.

Code:
return $this->responseView('Your_Mod_View', 'The_Route_Prefix_To_Return_To', $viewParams);
 
Let's say the page you're on has a route prefix of yourapp-enter.

Simply use the same route prefix to reload the page. So it would be

Code:
return $this->responseView('Your_Mod_View', 'yourapp-enter', $viewParams);

There's no need to define the full URL.
 
Hi, thanks for your help. I still use responseRedirect . And it works perfectly :D
This is my code:

Code:
return $this->responseRedirect( XenForo_ControllerResponse_Redirect::SUCCESS,$this->getDynamicRedirect(), new XenForo_Phrase('
starvnnet_save_success'));
$this->getDynamicRedirect() is useful in my case.
 
Last edited:
Top Bottom