Reputation: 657
I have several number inputs written in ruby. When I type in a number value inside the input, I assumed that whatever number is inside the field would show up as a value attribute inside the input html. But when I inspect the number input, the value does not show.
Why is that?
here is my ruby number input code:
<%= number_field_tag 'xsmall', nil, in: 1...100000%>
Upvotes: 0
Views: 1174
Reputation: 10061
When you enter a value into an input, it will not show up in the HTML. the point of value="2"
in the HTML is to tell the browser to pre-populate the input with that information
Upvotes: 1