ZF-4435: Sliders do not work/render properly when included within a Zend_Dojo_Form_SubForm()

Description

Getting the following incorrect rendering when I attach a Horizontal or Vertical Slider to a SubForm:

!http://img72.imageshack.us/img72/8651/…!

Here is my Form code:


class App_Form_SliderSubFormTest extends Zend_Dojo_Form
{
    public function init()
    {
        $this->setMethod('post');

        $this->setAttribs(array(
            'name'  => 'masterForm',
        ));

        $this->setDecorators(array(
            'FormElements',
            array('TabContainer', array(
                'id' => 'tabContainer',
                'style' => 'width: 600px; height: 300px;',
                'dijitParams' => array(
                    'tabPosition' => 'top'
                ),
            )),
            'DijitForm',
        ));

        $sliderForm = new Zend_Dojo_Form_SubForm();
        $sliderForm->setAttribs(array(
            'name'   => 'slidertab',
            'legend' => 'Slider Elements',
        ));

        $sliderForm->addElement(
                'HorizontalSlider',
                'slide1',
                array(
                    'label' => 'Slide me:',
                    'minimum' => 0,
                    'maximum' => 25,
                    'discreteValues' => 10,
                    'style' => 'width: 450px;',
                    'topDecorationDijit' => 'HorizontalRuleLabels',
                    'topDecorationLabels' => array('0%', '50%', '100%'),
                    'topDecorationParams' => array('style' => 'padding-bottom: 20px;')
                )
            );

        $this->addSubForm($sliderForm, 'slidertab');
    }
}

The sliders work and render correctly when attached directly to a Zend_Dojo_Form and when used via the $view->horizontalSlider() view helpers.

Comments

I should mention that this was found in trunk rev 11557.

Verified... when using the helpers programmatically. When you switch to declarative syntax, they do work, and this is a viable workaround until I can determine why the programmatic use case is failing.

To enable declarative syntax, call this in your view script prior to rendering the form:


Zend_Dojo_View_Helper_Dojo::setUseDeclarative(true);

fixed in r12387

Updating these issues to mark them resolved for 1.7.1.