<div class="questionnaire-question">

    <?php
    $options = array('label' => $question->title, 'labelOptions' => array('required' => $question->required));

    if (isset($question->options['min'])) {
        $options['min'] = $question->options['min'];
    }
    if (isset($question->options['max'])) {
        $options['max'] = $question->options['max'];
    }
    if (isset($question->options['step'])) {
        $options['step'] = $question->options['step'];
    }
    echo TbHtml::rangeFieldControlGroup("QuestionnaireQuestion[$question->id]", $options['min'], $options);
    ?>
</div>

<?php
$js = "
$('#QuestionnaireQuestion_{$question->id}').ionRangeSlider({
    min: {$options['min']},
    max: {$options['max']},
    type: 'single',
    step: {$options['step']},
    postfix: '',
    prettify:true,
    hasGrid: false
});";
?>
<script ><?php echo $js; ?></script>