Value attribute in textarea 3 boot file

I have a text box that I use as a form on a website.

I usually use the text "placeholder" inside, but I need this information for editing.

What I did before was just passing the information from my database to the form's β€œvalue” attribute. Then the form just appears with my data ready for editing.

For some reason, although it doesn’t work with my text box!

Here is my code:

<textarea value='<?php echo $info?>' class="form-control" id="message" name="message" rows="5"></textarea> 

I know this is not data, because iv repeated it elsewhere and in order. I also tried

 <textarea value='hi' class="form-control" id="message" name="message" rows="5"></textarea> 

nothing is displayed.

What's happening? I have been doing this all the time. Im using bootstrap 3, can this have something to do with this?

+7
html twitter-bootstrap
source share
4 answers
Tag

<textarea> has no value attribute http://www.w3schools.com/tags/tag_textarea.asp Content should be placed between opening and closing tags

 <textarea class="form-control" id="message" name="message" rows="5">hi</textarea> 
+14
source share

To put some text in a text box, you should write something like

 <textarea class="form-control" id="message" name="message" rows="5">hi</textarea> 

or

 <textarea class="form-control" id="message" name="message" rows="5"> <?php echo $info ?> </textarea> 
+2
source share

the text area does not matter, place the text between the opening and closing tags, for example

 <textarea name="myText"> this is text area </textarea> 
0
source share

Thank you very much, this solution helped a lot.

0
source share

All Articles