Zend remove anchor text in url redirect

Posted by user351785 on Stack Overflow See other posts from Stack Overflow or by user351785
Published on 2010-06-16T08:40:10Z Indexed on 2010/06/16 8:42 UTC
Read the original article Hit count: 361

Filed under:
|
|
|

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?

© Stack Overflow or respective owner

Related posts about text

Related posts about redirect