<input class="FormElement" name="term" id="term" type="text">
What modifications should I do to this textbox to make it multiple line, without the need to modify anything else in the code, like reading its value.
I used to read the input by javascript like that, what should be changed in that as well?
var $term = $("textarea#term").val();
A multiline text box control is a large text box that can display several lines of text or accept this text from user input. Text boxes are often linked to select value lookups and detailed menus. You can place a multiline text box control within a section control.
The TEXTAREA element creates a multi-line text input control. User agents should use the contents of this element as the initial value of the control and should render this text initially. This example creates a TEXTAREA control that is 20 rows by 80 columns and contains two lines of text initially.
Definition and Usage The multiple attribute is a boolean attribute. When present, it specifies that the user is allowed to enter more than one value in the <input> element. Note: The multiple attribute works with the following input types: email, and file.
You need a <textarea>
with the same name
, so replace this:
<input class="FormElement" name="term" id="term" type="text">
With this:
<textarea class="FormElement" name="term" id="term" cols="40" rows="4"></textarea>
The rows
and cols
arguments are the width/height respectively...or use CSS styling to specify the size, like this:
<textarea class="FormElement" name="term" id="term" style="width: 200px; height: 40px;"></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