I am creating a website where users can write their poetries. I created a simple form for where the user can write the title of the poetry, body of the poetry, and his name/nickname. Since the poetries are generally vertically long (short phrases with a lot of new lines), I am trying to expand vertically the dimension of the field: ':body'.
My simple form for is:
<br>
<div class="container">
<div class="row ">
<div class="col-sm-4 col-sm-offset-4">
<%= form_for(poetry) do |f| %>
<div class="form-group">
<%= f.label :title, "Titolo"%>
<%= f.text_field :title, as: :string, class: 'form-control'%>
</div>
<div class="form-group">
<%= f.label :body, "Poesia"%>
<%= f.text_field :body, as: :text, label: false, class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label :author, "Autore" %>
<%= f.text_field :author, as: :string, label: false, class: 'form-control' %>
</div>
<%= f.submit "Conferma", class:"btn btn-secondary btn-lg" %>
<% end %>
</div>
</div>
</div>
I tried to add the following pieces of code, but they are not working.
:input_html => {:maxlength => 15, :size => 40}
:input_html => {:maxlength =>2,:style=> 'width: 20px'}
<%= f.text_field, :input_html => {:rows => 10} %>