PHP code example of djabiev / yii2-ion-slider-ntv

1. Go to this page and download the library: Download djabiev/yii2-ion-slider-ntv library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

djabiev / yii2-ion-slider-ntv example snippets


echo $form->field($model, "attribute")->widget(\yii2mod\slider\IonSlider::className(), [
        'pluginOptions' => [
           'min' => 0,
           'max' => 1,
           'step' => 1,
           'onChange' => new \yii\web\JsExpression('
                function(data) {
                     console.log(data);
                }
           ')
         ]
]); 

echo \yii2mod\slider\IonSlider::widget([
    'name' => 'slider',
    'type' => \yii2mod\slider\IonSlider::TYPE_DOUBLE,
    'pluginOptions' => [
        'min' => 0,
        'max' => 20,
        'from' => 2,
        'to' => 18,
        'step' => 1,
        'hide_min_max' => true,
        'hide_from_to' => true
    ]
]);
                                

'assetManager' => [
            'bundles' => [
                'yii2mod\slider\IonSliderAsset' => [
                    'css' => [
                        'css/normalize.css',
                        'css/ion.rangeSlider.css',
                        'css/ion.rangeSlider.skinFlat.css'
                     ]
                ],
            ],
        ]

php composer.phar