Many to Many with Zend_Form and Zend_Db

May 21st, 2009

This is part 2 in a series on many to many with Zend_Form and Zend_Db. I suggest starting with last week’s video on Zend_Db and many-to-many in order to follow the configuration of our models. Grab the code and follow along! This concludes this series on Zend_Db. I’ve also uploaded a zipped version of the code if that’s easier than Google Code.

 

10 Responses to “Many to Many with Zend_Form and Zend_Db”

  1. Decoder says:

    Thanks so much!
    In recent casts is very much useful information.
    I wish you success

  2. tawfekov says:

    Thank you very much about this cast
    and for the zipped file

  3. Marijan says:

    Thanks a lot for all your cast. I really appreciate what you do to make us a lot easier to learn ZF.

    I find ZF very useful so I started to learn about it. My next project will be in ZF so every tip I can get is cool, and you gave me good tips :) .

    Thx :)

  4. staar2 says:

    Nice cast, but I am waiting cast for modular setup. I dont get the modular way of working.

  5. jon says:

    Hi Staar2,

    Are you referring to Zend “Modules”?

  6. Derick says:

    I noticed you were using $dataRowset[0] to grab the first row in a Zend_Db_Table_Rowset.

    Was there a reason you weren’t using ->current() or was it just convenient?

  7. jon says:

    hey Derick… probably just convenience :)

  8. Oliver says:

    Cool casts that that will give me a quick start :-)

    Anyway I think Zend is a cool thing, although the generated checkbox code is horrible…:

    $this->addElement(new Zend_Form_Element_Checkbox(”test”));

    generates

     

    the dt/dd are so far ok, but what the hell should this hidden textfield? you normally have w3c compliant the possibility to have more checkboxes with the same name and get a comma separated list after post…
    this is impossible with Zend because of this hidden field…

  9. Oliver says:

    Cool casts that that will give me a quick start :-)

    Anyway I think Zend is a cool thing, although the generated checkbox code is horrible…:

    $this->addElement(new Zend_Form_Element_Checkbox(”test”));

    generates

    >dt id=”test-label”> 
    >dd id=”test-element”>
    >input type=”hidden” name=”test” value=”0″ />>input type=”checkbox” name=”test” id=”test” value=”1″ />>/dd>>/dl>

    the dt/dd are so far ok, but what the hell should this hidden textfield? you normally have w3c compliant the possibility to have more checkboxes with the same name and get a comma separated list after post…
    this is impossible with Zend because of this hidden field…

  10. Paul says:

    As far as I can tell, the hidden field is there so that you know whether the checkbox was checked or not. In a normal HTML form, a checkbox which hasn’t been checked isn’t included in the POST variables.

    Extremely useful screen cast by the way.

    Any ideas how you could include the “Associate” form into a “Create User” form? So that you can create a user and add task associations in one form?

Leave a Reply

Desktop RSS feed iPhone + iPod