I have designed a form in which I have two items in a row, like this:
My output
Code that I used:
<div class="row">
<div class="col-sm-3"> <!-- [1, 0] -->
<fieldset class="form-group">
<label id="fieldTitle">Equipment Length</label>
<select id="selectOption" class="form-control" required data-error="Please select Equipment Length"></select>
<div class="help-block with-errors"></div>
</fieldset>
</div>
<div class="col-sm-9"> <!-- [1, 1] -->
<fieldset class="form-group">
<label id="fieldTitle">Customer Notes</label>
<textarea class="form-control" placeholder="Please write customer notes" ng-model="myTextarea" required data-error="Please enter customer notes"></textarea>
<div class="help-block with-errors"> {{myTextarea}} </div>
</fieldset>
</div>
</div>
So, please guide me how do I increase the height of the textarea just like my
desired output please tell me how do I do it. Thanks
The size of a textarea can be specified by the cols and rows attributes, or even better; through CSS' height and width properties. The cols attribute is supported in all major browsers.
It can be achieved by using JavaScript and jQuery. Method 1: Using JavaScript: To change the height, a new function is created which changes the style property of the textarea. The height of the textarea is first set to auto. This value makes the browser set the height of an element automatically.
There are two ways of setting the size of the HTML <textarea> element. You can use HTML or CSS. In HTML, you can use the cols and rows attributes.
With Bootstrap 4 you will need to have the property rows and add "height: 100%;" so that the height would stretch to the number of rows specified. "rows" along does not work.
<textarea rows="10" style="height:100%;"></textarea>
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