I have a custom form with an action that calls my module controller, I would like to prevent the redirect and stay on the page where the form is submitted but when I try to add a wildcard in my controller index action I get a 'too many redirects error'
$this->_redirect('*/*/');
I've also tried
$this->_redirectReferer();
And
$this->_redirectReferer('*/*/');
Here is my index Action in my module controller
public function indexAction()
{
$params = Mage::app()->getRequest()->getPost();
if (isset($params['country'])) {
$this->setCountry((string)$params['country'], isset($params['hide']));
}
if (isset($params['currency'])) {
$this->setCurrency((string)$params['currency']);
}
$this->_redirectReferer();
}
And below is my form which posts to my controller
<form method="post" action="<?php echo Mage::getUrl('locale/switch'); ?>">
....
</form>
Is there a better way to have this form submit without redirecting to the controller.