I am trying to change the standard Ruby on Rails form so that the user enters a value with an HTML5 range. I cannot figure out how to replace the standard "<% = f.text_field: W1%>".
I have a slider:
<input class="slide" type="range" min="0" max="200" id="slider1">
Value display in:
<text id="W1">100</text>
Thanks Ajax:
$("#slider1").change(function () { var newValue = $('#slider1').val(); $("#W1").html(newValue); });
I canβt find out where and how should I get the input value to install W1?
EDIT: HTML5 range is a rangeyfield formula in Ruby. I'm still looking for the correct implementation, so any help would be appreciated
source share