I'm using a form in Rails with a text area. This is good, except that the text area is resizable by the user. I don't want the user to be able to resize it. How can I do that?
<%= form_tag "doit", :id => "doit_form" do -%>
Names <br/>
<%= text_area_tag "names", nil, :rows => 4, :cols => 50 %> <br/>
Date <br/>
<%= text_field_tag "date" %> <br/>
<%= submit_tag "Do it!" %>
<% end -%>
Use CSS:
textarea { resize: none; }
Works with most browsers. Older browsers don't have the handle to resize textarea fields so then it shouldn't be a problem anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With