Zend remove anchor text in url redirect
- by user351785
I have a form that is using an anchor name as it's action so that when the form is submitted it is it goes straight back to the form (for example 'www.domain.com/page#contact-form). The idea is if there are any errors then it'll go straight to the form (that's near the bottom of the page) so you can see the errors and continue filling in the form. If the form is valid, I want it to redirect to another page (for example www.domain.com/another-page). The problem is that the redirect url still has the anchor text in the url (in the above example it is www.domain.com/another-page#contact-form).
I am using
$this->_helper->redirector->goToRouteAndExit(array(), 'another-page', true);
to goto the another-page route. I have tried setting the url specifically but that doesn't fix it either.
How do I redirect to another page and remove that anchor text from the url?