0

I have value to show in input textbox in HTML. The value is address. if address characters are more then i want to show whole text in the form of value of input textbox. Actually it shows the value correctly. But i want to see it in full text box.[Here, Address part shown. I want whole address in shown in this input text box.

My Code Is Like.

<tr>
<td class="tabth" style="border-bottom: 1px solid black;">Address</td> 
<td class="tabtd" style="border-bottom: 1px solid black;">
    <input type="text" style="height:50px; overflow: auto;" name="address" value="502, Venus Atlantis, Nr. Shell Petrol Pump, Anandnahar-Prahladnagar Road, Ahmedabad,Gujarat, India............kkkkkkkkkkkkkk...........">
<‌​/td> 
<td>
<button type="submit" name="export" value="reg" class="btn btn-success pd">Save</button>
</td> 
</tr>

Here is image of my output

Chirag
  • 994
  • 2
  • 11
  • 26
Jay Katira
  • 181
  • 10

2 Answers2

2

You can use textarea to show or get your long text values like that

<textarea  cols="40" rows="5" style="resize:none" name="address">
"502, Venus Atlantis, Nr. Shell Petrol Pump, Anandnahar-Prahladnagar Road, Ahmedabad,Gujarat, India"
</textarea>

Cols will change horizantal and Rows will change vertical length of input. Also you can use ReadOnly=true if you want to not implement an input but an output element instead of this.

ReadyFreddy
  • 898
  • 8
  • 20
1

If you want the text to break into a new line, you need to use textarea (input text only allows one line of text)

<textarea name="Text1" cols="40" rows="5"></textarea>
Madzgo
  • 104
  • 2
  • 10