Jump to content

Zend Framework: Mechanism behind populate method in Zend_Form and $_POST var


ethereal1m

Recommended Posts

Dear all,

I try to understand the mechanism behind populate method in Zend_Form class. Suppose  I have the following statement where is the part of method that is in a view helper class that  instantiates Zend_Form object:

        $form->populate(array(
            'productId' => $product->productId,
            'returnto' => $this->view->url()
        ));

where productId and returnto are hidden elements of the form. If I modify the code by excluding productId and run a debugger, set a breakpoint at the very beginning of index script, and look at the $_POST variable, the productId is not set (whereas returnto is). I don't understand what the mechanism behind the HTTP POST method and Zend_Form populate method is. I thought at the very beginning the code in view helper class was not even read yet. Anybody could explain that?

 

Much appreciated,

ethereal1m

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.