PHP code example of tractorcow / silverstripe-sliderfield
1. Go to this page and download the library: Download tractorcow/silverstripe-sliderfield 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/ */
tractorcow / silverstripe-sliderfield example snippets
// 0 is the minimum value, 20 is the maximum value
$fieldX = new SliderField('PositionX', 'Horizontal Offset', 0, 20);
// A vertical slider can be specified with setOrientation
$fieldY = new SliderField('PositionY', 'Vertical Offset', 0, 10);
$fieldY->setOrientation('vertical');