Issues

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

Issue Type: Patch Created: 2010-09-21T07:41:37.000+0000 Last Updated: 2011-08-01T14:31:37.000+0000 Status: Resolved Fix version(s): - 1.11.6 (05/May/11)

Reporter: Webdevilopers (tridem) Assignee: Martijn Swaagman (swaagie) Tags: - Zend_Dojo

Related issues: - ZF-10480

Attachments: - Zend_Dojo_View_Helper_Slider.patch

Description

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

<pre class="highlight">
<?
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

Posted by Martijn Swaagman (swaagie) on 2011-04-23T09:31:47.000+0000

Correct final patch, overrides patch of bug 11301

Posted by Matthew Weier O'Phinney (matthew) on 2011-05-02T20:07:32.000+0000

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

Posted by Robert Basic (robertbasic) on 2011-08-01T14:31:37.000+0000

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

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts