php - Getting raw HTML Textarea within other rextarea (laravel 5.3)
I am getting raw html from my controller and getting it into textarea. there is different type of fields as text select or also can be textarea which will be print in textbox as raw html. its working fine for all fields except textarea.
when there is a field include with textarea type then below buttons string code not comes in text box and code of textarea type shows but without ending tag as
here is my code.
foreach($fields as $field){
$type = $field->type;
switch($type) {
case 'textarea':
$str .= '<div >
<label >'.$custom_field->name.'
</label>
<div >
<div >
<i ></i>
<textarea name="'.$field->id.'" rows="8"></textarea>
</div>
</div>
</div>';
break;
}
}
Now every thing works fine except when textarea type included. problem is if there is textarea type then below buttons not appear and also not ending tag of textarea
this end of html out put is as without buttons sting and without endtag
`<div >
<label >Description
</label>
<div >
<div >
<i ></i>
<textarea name="17" rows="8">`
please help where its wrong
Answer
Solution:
You just replace
<
with<
and>
with>
Everything else is OK.
Just edit your case to: