ZF-7194: Zend_Dojo_Form needs to be rendered before echoing dojo() in viewscript

Description

I had to read through the code, search for requireModule before I realized that echo $this->dojo() cannot be called before calling the $this->form->render() if the correct dojo.require() are to appear in the header. I would appreciate if this was clearly stated in the docs. This is obvious once one thinks of it but not always by default see Stackoverflow question 1 and question 2.

Currently in zend.dojo.view.html: {quote} In our layout script, we'll then check to see if Dojo is enabled, and, if so, we'll do some more general configuration and assemble it:

...code...

At this point, you only need to ensure that your files are in the correct locations and that you've created the end point action for your FilteringSelect! {quote}

I suggest add before "At this point" a "Make sure that any widgets created in the the layout are created before the echo $this->dojo() or the required modules etc won't be able to properly load".

Comments

Added a few suggestions to how the docs might be changed.

Changed to current docs