Issues

ZF-10479: Setting value on Zend_Dojo_Form_Element_HorizontalSlider does not work in programmatic mode

Description

Setting a value on the slider does not work in programmatic mode. - Declarative works fine.


<?
class Dojo_Form_Slider extends Zend_Dojo_Form
{
    public function init()
    {
        $severityElement = new Zend_Dojo_Form_Element_HorizontalSlider('severity');
        $severityElement->setValue(2);
        $severityElement->setMinimum(1);
        $severityElement->setMaximum(3);
        $severityElement->setDiscreteValues(100);
        $severityElement->setBottomDecorationLabels(array(
            'easy', 'medium', 'hard'
        ));
        $severityElement->setBottomDecorationParams(array(
            'list' => array(
                'style' => 'height:1em; font-size=75%;color:gray;',
            )
        ));
        $this->addElement($severityElement);
    }
}

Comments

Correct final patch, overrides patch of bug 11301

Applied to trunk and 1.11 release branch, and noted that it supercedes ZF-11301 patch.

Pull request for porting the patch in ZF2 is sent: https://github.com/zendframework/zf2/pull/311