please i want to display content in editable text area but is not possible it only display input text
<div >
<label for="inputAddress2">News Bar</label>
<textarea type="text" name="title" id="inputAddress2" value="<?php echo $row['title']; ?>" placeholder="Enter your news bar"
CodePudding user response:
This is as example putting icons in the field. You can use any other elements you wish by following the same principal.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
.input-icons i {
position: absolute;
}
.input-icons {
width: 100%;
margin-bottom: 10px;
}
.icon {
padding: 10px;
min-width: 40px;
}
.input-field {
width: 100%;
padding: 10px;
text-align: center;
}
</style>
</head>
<body>
<h3>
Icons inside the input element
</h3>
<div style="max-width:400px;margin:auto">
<div >
<i ></i>
<input type="text">
<i ></i>
<input type="text">
<i ></i>
<input type="text">
<i ></i>
<input type="text">
<i ></i>
<input type="text">
</div>
</div>
</body>
</html>
CodePudding user response:
A <textarea>
element doesn't use the value
attribute, you place content between the starting and ending tags:
<div >
<label for="inputAddress2">News Bar</label>
<textarea
name="title"
id="inputAddress2"
placeholder="Enter your news bar"
><?php echo $row['title']; ?></textarea>
</div>
I also removed the type="text"
from the textarea.