I am trying to implement a pre-filled HTML form in Ruby on Rails where @product.price variable will be pre-filled. I don't really think a textarea is the one that I am looking for.
I have tried the following but it doesn't seem to be able to work.
<div class="field">
<%= f.number_field :priceOffer, :input_html => {:value => @product.price }, class:"form-control" %>
</div>
Any suggestions why it couldn't work properly?
Aucun commentaire:
Enregistrer un commentaire