Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 877971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:41:46+00:00 2026-05-15T11:41:46+00:00

I have a form that is using an anchor name as it’s action so

  • 0

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 http://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 http://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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T11:41:47+00:00Added an answer on May 15, 2026 at 11:41 am

    I would have presumed that you could do something like:

    if ($this->_request->isPost()) {
       if ($formObject->isValid($this->_request->getPost())) {
          // do something
          $this->_redirect('/my/new/url/');
       } else { // if error
          // do something else
          $this->_redirect('/my/original/url/#anchor);
       }
    }
    

    Any use?

    Edit: Assuming that you are using Zend_Form/Zend_Dojo_Form

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this form that is using data-defaults and I need to be sure
I have a web form that is using this awesome plugin and I'm trying
Ok, the question alone is making my head spin. I have an anchor tag
I have a page (and divs) that are being dynamically generated and what I
When using a form like this: <h2> <%:Model.EulaTitle %> </h2> <p> <%=Model.EulaHtml %> </p>
I'm wondering how you might go about implementing multiple form actions when submitting a
I'm using IntelliJ's UI designer and now I'm stuck as the designer has decided
I'm trying to make an EXTJS application to send email with an attachment. So
I think the question may seem a little weird, but here's the details. The
OK, I admit it. I'm a CI newbie. I'm doing something really basic wrong

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.