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

  • SEARCH
  • Home
  • 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 6653115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:13:39+00:00 2026-05-26T01:13:39+00:00

I am creating a Zend Form using Dojo elements and I would like to

  • 0

I am creating a Zend Form using Dojo elements and I would like to layout the form elements using CSS. Unfortunatly the element is not being given an ID like all other elements in my form.

Output

<dt id="purchase_required-label"></dt>
<dd><table id="widget_purchase_required" class="dijit dijitReset dijitInlineTable disabled dijitTextBox dijitTextBoxDisabled" cellspacing="0" cellpadding="0" wairole="presentation" dojoattachevent="onmouseenter:_onMouse,onmouseleave:_onMouse" name="purchase_required" style="display: -moz-inline-stack;" role="presentation" widgetid="purchase_required"></table></dd>
<dt id="purchase_supplier_id-label"></dt>
<dd id="purchase_supplier_id-element"></dd>

Example Code

$purchase_required = new Zend_Dojo_Form_Element_DateTextBox('purchase_required');
$purchase_required->setLabel('Required Date');
$purchase_required->setAttribs(array("dojoType"=>"dijit.form.DateTextBox"));
$purchase_required->setRequired(TRUE);
$purchase_required->addErrorMessage('Please enter date as YYYY-MM-DD');
$this->addElement($purchase_required);

Is this a bug or am I missing something?

  • 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-26T01:13:40+00:00Added an answer on May 26, 2026 at 1:13 am

    It appears that id is removed from that element in Zend_Dojo_Form_Element_Dijit when it overrides loadDefaultDecorators. You could probably restore it by using something like what happens in Dijit’s superclass: Zend_Form_Element:

    $getId = create_function('$decorator',
                                 'return $decorator->getElement()->getId()
                                         . "-element";');
    $purchase_required->addDecorator(
             'HtmlTag', 
             array(
                   'tag' => 'dd',
                   'id'  => array('callback' => $getId)
                  )
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When creating form elements with Zend (using Zend Studio for Eclipse), I'd like some
I am creating checkbox elements in Zend Form like this: $element = $this->CreateElement('checkbox', 'CheckIt');
I am creating a form, using Zend Form. I have 8 input elements. And
I'm creating an email form element like so (inside a Zend Form): //create e-mail
About to create a form using Zend Form, all the form elements should have
I'm creating a Zend Form which includes a Zend Form Element File to allow
I am creating a custom zend form element that will require some javascript. I
I'm doing this tutorial: http://www.phpeveryday.com/articles/Zend-Framework-Database-Creating-Input-Form-P494.html We are building a simple input form using POST
I am creating a Zend Form to allow the user to change the current
Eariler I happily used the following code for creating form elements (inside Zend_Form descendant):

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.