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
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