Input Number Range
get_input_number_range
PHP Developer Guide: get_input_number_range Function
This guide explains how to use the get_input_number_range function from your PHP framework. This function automatically generates a styled HTML two-input number: from and to. Also, a framework as default "understands" from to logic.
It supports:
- From-to logic
- Custom classes, placeholders, and attributes
Manual Example with get_input_number_range
- JSON
- PHP
- HTML
{
"element": [{
"input_number_range": {
"title": "Age",
"name": "age"
}
}]
}
$magic->get_input_number_range('age', [],
[
'title' => 'Age',
...
]);
<div class="w_40 fe_f swr">
<div class="fe_f dtd w_40 ewi">
<div class="w_40 did-floating-label-content age half-block">
<i class="icon ei-close dell_date"></i>
<input class="w_40 did-floating-input noscroll" value="" name="age_from" type="number"/>
<label class="did-floating-label">Age from</label>
</div>
<div class="w_40 did-floating-label-content age half-block">
<i class="icon ei-close dell_date"></i>
<input class="w_40 did-floating-input noscroll" value="" name="age_to" type="number"/>
<label class="did-floating-label">Age to</label>
</div>
</div>
</div>