-- drj201 <[EMAIL PROTECTED]> wrote
(on Tuesday, 25 November 2008, 05:14 AM -0800):
> I have created a form class that extends Zend_Dojo_Form. I have various
> elements (i.e. ComboBox, DateTextBox etc) in the form including a
> SubmitButton and they all display perfectly in ZF1.6.1.
>
> My problem has arrisen since upgarading to ZF 1.7. Since the upgrade the
> SubmitButton is not displaying correctly (Everything else works fine).
It's a known bug and it's been submitted to the issue tracker no fewer
than four times.
Until 1.7.1 is released, there's a simple, forward-compatible
workaround: set the 'label' dijit parameter, as shown below:
> Below is the code involved:
>
> $this->addElement('SubmitButton', 'submit', array(
> 'label' => 'Submit!!!!!!',
'dijitParams' => array('label' => 'Submit!!!!!!'),
> 'decorators' => $this->_buttonElementDecorator // returns array
> ('DijitElement')
> ));
This will ensure that the label is drawn.
>
> $this->addDisplayGroup(
> array('submit'), 'datasubmit',
> array(
> 'disableLoadDefaultDecorators' => true,
> 'decorators' => $this->_buttonGroupDecorator, // returns array
> ('FormElements', 'Fieldset')
> 'class' => 'submit'
> )
> );
>
> This results in the following HTML being generated:
>
> <input content="Submit!!!!!!" id="submit" name="submit" value=""
> type="submit" /></fieldset></form>
>
>
> Note the 'label' value from the addElement is placed within a 'content'
> attribute in the HTML but the 'value' remains empty...?!
>
> Am I doing something wrong? Apologies if so... This works perfectly fine in
> ZF 1.6.1. I notice the Dojo CDN has changed to Google in the latest release
> but Im unsure of the cause... Both Zend_Dojo_View_Helper_SubmitButton and
> Zend_Dojo_View_Helper_Button appear to be exactly the same in both
> versions...
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend Framework | http://framework.zend.com/