Using Dojo Widget with Zend_Form

intro
This article shows usage of Dojo widgets(dijit) with Zend_Form. Using dijit, it is possible to input date with calendar etc.
You can see the screens from the demonstration site.

1.Create Controller
Create the file application/constorllers/DojoController.php with the following content.
2.Create View
Create the file application/views/scripts/dojo/index.phtml with the following content.

And speficy the style class of body tag.

3.Check
Access the web server and check the dojo widgets.
History
Date Content
2008/4/30 Published

5 Comments

  1. hi, what about showing some examples using YUI (there is no example on the net) as it’s becoming a major javascript framework.

    Best regards,

    Nicolas

  2. You should render your form before the viewscript then all you need to do is a:
    if ($this->dojo()->isEnabled()){
    echo $this->dojo();
    }

    And you skip the part with the dojo.require() etc. I would also stress the importance of giving the form a unique name to allow programmatic initialization (as correctly provided in the tutorial).

Leave a Reply

Your email address will not be published. Required fields are marked *