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

  • SEARCH
  • Home
  • 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 7917975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:20:48+00:00 2026-06-03T15:20:48+00:00

I am using action stack in my ZF application. I will explain scenario over

  • 0

I am using action stack in my ZF application. I will explain scenario over here. In first action I have simple form with select box and submit button. Now on post I validate data and save and push my second action in action stack.

Second action that I pushed in stack is also having a form which will save data on post.

Now the problem occurs here: when action stack gets processed, it pops stack and forwards my second action stored in stack. Now when my second action is called it goes directly to the loop in post and tries to validate data because the first action request was post, and I don’t get the form from second action.

I know action stack is evil but as of now I have no other alternative. this is just one scenario i have tried to explain my problem.

I would be glad to explain more in detail if i am not able to explain question properly…

public function firstactionAction() {
    if($this->getRequest()->isPost()) {
        //validate and save form
        $helper = Zend_Controller_Action_HelperBroker::getStaticHelper('actionStack');
        $request = new Zend_Controller_Request_Http();
        $request->setControllerName('index');
        $request->setModuleName('default');
        $request->setActionName('secondaction');
        $helper->pushStack($request);
    } else {
        //creating form object and assigning to view.
    }
}
public function secondactionAction() {
    if($this->getRequest()->isPost()) {
        //Problem is here.. when action stack gets processed.. it directly comes here. as it uses forward internally..
    } else {
        //creating form object and assigning to view.
    }
}

thanks in advance…

  • 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-06-03T15:20:49+00:00Added an answer on June 3, 2026 at 3:20 pm

    I see one easy way: just add a simple hidden field to each form and do the next condition:

    if($this->getRequest()->isPost() && $this->getRequest()->getPost('hidden') == 'second_form') {
        // ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I stack with this, I'm trying to create application using TabLayout. I have 3
I'm struggling with my first simple hello world RX application. I'm using VS2010 RC,
I am using spring+struts2 and I have a large number of action classes that
I'm currently rebuilding an existing PHP application using Java. I therefore have an existing
I'm in the process of building my first web application using ASP.NET MVC 2
I have an MVC-3 (RC1) application using Entity Framework 4. I wish to return
Here's the situation: ASP.NET MVC 3 application using Razor as the view engine. Works
I have a Web application using spring and hibernate and struts (it runs on
I am developing an application using MVC Preview 5. I have used typed views.
Just a quick one: what are peoples thoughts on using Action delegates for public

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.