Home Ask Login Register

Developers Planet

Your answer is one click away!

Tom Canfarotta February 2016

Input Range Limited to one per form

I have a form where I need three input ranges for user selection.

When i implement one range it works perfecly fine (see below) but when i add a 2nd or a 3rd range the output variable always remains at 0.

How would I add two more ranges to this form?

My form looks like:

<form action='search.php' method='post' oninput='amount.value=rangeInput.value'>

<input type='range' id='rangeInput' name='satscore' min='0' max='2400'>

<output name='amount' for='rangeInput'>0</output>

<input type='submit' value='FILTER'>



WayNe February 2016

Without seeing your full code, i guess the problem comes from how you name the ranges and input fields. This should work:

<form action='search.php' method='post' oninput='amount1.value=rangeInput1.value; amount2.value=rangeInput2.value; amount3.value=rangeInput3.value;'>

<input type='range' id='rangeInput1' name='satscore1' min='0' max='2400' value="0">
<output name='amount1' for='rangeInput'>0</output>

<input type='range' id='rangeInput2' name='satscore2' min='0' max='2400' value="0">
<output name='amount2' for='rangeInput'>0</output>

<input type='range' id='rangeInput3' name='satscore3' min='0' max='2400' value="0">
<output name='amount3' for='rangeInput'>0</output>

<input type='submit' value='FILTER'>


Post Status

Asked in February 2016
Viewed 2,540 times
Voted 9
Answered 1 times


Leave an answer

Quote of the day: live life