Show values of CJuiSliderInput

Hi! I have used CJuiSliderInput to create a range-slider that searches between two values in a database table-row, everything works as expected but I want to show the values that the slider currently stands on, "on the fly", for example Range: 10-23.

How can I create this functionality?

See example here: http://jqueryui.com/demos/slider/#option-values, and click on "range slider"

This is my code:




$this->widget('zii.widgets.jui.CJuiSliderInput', array(

    'model'=>$model,

    'attribute'=>'range1',

    'maxAttribute'=>'range2',

    // additional javascript options for the slider plugin

    'options'=>array(

        'range'=>true,

        'min'=>5,

        'max'=>30,

    ),

    'htmlOptions'=>array(

    	'style'=>'width:400px;',

    ),

));



If I create two textFields like this:

<?php echo $form->textField($model,‘range1’); ?>

<?php echo $form->textField($model,‘range2’); ?>

This works for "range1" and shows the lowest value in the "range1" textField but why does it not work with "range2"?

i think its because range2 you have to declare it in your model and also add it to your rules in the model.

Hi,

check this link

http://demo.bsourcecode.com/yiiframework/cjuislider

goto ranger portion… your problem sovled … cheers