Skip to content

Files

Latest commit

 

History

History
32 lines (24 loc) · 812 Bytes

range.md

File metadata and controls

32 lines (24 loc) · 812 Bytes

Range Field

Represents <input> element of type "range" that lets the user specify a numeric value which must be no less than a given value, and no more than another given value. Documentation:

Usage Example

Widget:

use Yiisoft\Form\Field\Range;

echo Range::widget()
    ->name('RangeForm[volume]')
    ->value(23)
    ->label('Volume level')
    ->inputId('rangeform-volume')
    ->min(1)
    ->max(100);

Result will be:

<div>
    <label for="rangeform-volume">Volume level</label>
    <input type="range" id="rangeform-volume" name="RangeForm[volume]" value="23" min="1" max="100">
</div>