Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 936139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:15:55+00:00 2026-05-15T21:15:55+00:00

I have a quick question about adding Zend_Dojo_Form into Zend_layouts. I have a Zend_Dojo_Form

  • 0

I have a quick question about adding Zend_Dojo_Form into Zend_layouts.

I have a Zend_Dojo_Form that I want to display in the layout that is used for a particular controller. I can add the form to the layout without any issue however the dojo elements fail to render, as they would do if I added the form to a standard view.

Is there any reason why this would be the case? Do I need to do something to the layout so that it will enable the components for this embedded form in the layout. Any other dojo enabled forms that are added in the view using this layout work fine.

My form is created in the usual way:

class QuickAddJobForm extends Zend_Dojo_Form{


public function init(){

    $this->setName('quickaddjobfrm')
        ->setMethod('post')
        ->setAction('/addjob/start/);


    /*We now create the elements*/
    $jobTitle = new Zend_Dojo_Form_Element_TextBox('jobtitle',
        array(
            'trim' => true              
        )
    );
    $jobTitle->setAttrib('style', 'width:200px;')
        ->addFilter('StripTags')
        ->removeDecorator('DtDdWrapper')
        ->removeDecorator('HtmlTag')
        ->removeDecorator('Label');

      ....
  $this->addElements(array($jobTitle, ....));

In the controller I declare the layout and the form in the init function:

 public function init(){
   $this->_helper->layout->setLayout('add-layout');
   $form = new QuickAddJobForm();
   $form->setDecorators(array(array('ViewScript', array('viewScript' => 'quickAddJobFormDecorator.phtml'))));

 $this->_helper->layout()->quickaddjob = $form;

In my layout Where I want the form I have:

  echo $this->layout()->quickaddjob;

Why would adding this form in the layout fail to render/add the Dojo elements? All that is currently being displayed are text boxes, rather than some of the other components such as ComboBoxes/FilteringSelects etc…

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:15:56+00:00Added an answer on May 15, 2026 at 9:15 pm

    This is what I have in my layout.phtml

    <head>
    
        <style type="text/css" media="screen">
            @import url("<?= Zend_Controller_Front::getInstance()->getBaseUrl() ?>/includes/js/dojo/dijit/themes/tundra/tundra.css");
    
    <?php
    $this->dojo()->enable();
        if ($this->dojo()->isEnabled()) {
            $this->dojo()->setLocalPath($this->baseUrl() .  '/includes/js/dojo/dojo/dojo.js');
            echo $this->dojo();
        }
    ?>
    </head>
    <body class="tundra">
    

    In my bootstrap I use

        protected function _initDojo()
    {
        $this->bootstrap('frontController');
        $this->bootstrap('view');
        $view = $this->getResource('view');
    
        $appConfig = Zend_Controller_Front::getInstance()->getParam('appconfig');
        Zend_Dojo::enableView($view);
        Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
        $view->dojo()->setLocalPath(Zend_Controller_Front::getInstance()->getBaseUrl() . '/includes/js/dojo/dojo/dojo.js')
        ->addLayer(Zend_Controller_Front::getInstance()->getBaseUrl() . '/includes/js/dojo/dojo/nirvanaDojo.js')
        ->requireModule('dijit.TitlePane')
        ->requireModule('dijit.InlineEditBox')
        ->requireModule('dijit.ProgressBar')
        ->requireModule('dijit.form.DateTextBox')
        ->addStyleSheetModule('dijit.themes.tundra');
    }
    

    Now I can call $this->form anytime in my view scripts, and the Dojo renders properly

    The problem I have is I can’t cant Dojo to render a form in Modal window

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a quick question about the layout of the page on a custom
Quick question about include/requre_once . I have some code that is common to a
Quick question about cursors (in particular Oracle cursors). Let's say I have a table
i have a quick Binding Question about Silverlight. I have some Expander and want
I have a quick question about jquery .. I want to find < a
I have a quick question about while loop. I want to read ASCII char
Quick question about data joining. Say I have some elements that each contain a
I have quick question about text parsing, for example: INPUT=a b c d e
I have a quick question about something I imagine must be pretty easy -
I have a quick question about ARC in iOS. (Sorry I've asked so many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.