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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.