PHP code example of lubosdz / yii2-ui-range-plus-minus

1. Go to this page and download the library: Download lubosdz/yii2-ui-range-plus-minus 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/ */

    

lubosdz / yii2-ui-range-plus-minus example snippets



use lubosdz\ui\RangePlusMinus;

<?= $form->field($model, 'area_m2')->widget(RangePlusMinus::className(), [
	'bsVersion' => 3, // <-- enforce bootstrap 3 layout, since 1.0.3 is default BS4
	'unit' => 'm2',
	'min' => 10,
	'max' => 100,
	'tooHigh' => Yii::t('app', 'Maximum value is {max}.'),
	'tooLow' => Yii::t('app', 'Minimum value is {min}.'),
	'step' => 5,
	'cssClassMinus' => 'glyphicon glyphicon-minus',
	'cssClassPlus' => 'glyphicon glyphicon-plus',
	'options' => [
		'onchange' => new JsExpression('console.log(this)'),
	],
])