One thing I'm worried about is that when I pull raw HTML data from the database as a string using ajax, everything works fine.
However, when I try to add it into a DIV, it just displays the code as is without converting it into a formatted layout.
The JavaScript code snippet looks like this:
JQuery
var str='<textarea rows="4" cols="10" class="form-control physical_examination(urine)_field1" name="physical_examination(urine)_field1[]" placeholder=""></textarea><br/><textarea rows="4" cols="10" class="form-control physical_examination(urine)_field2" name="physical_examination(urine)_field2[]" placeholder=""></textarea><br/><textarea rows="4" cols="10" class="form-control physical_examination(urine)_field3" name="physical_examination(urine)_field3[]" placeholder=""></textarea><br/><textarea rows="4" cols="10" class="form-control physical_examination(urine)_field4" name="physical_examination(urine)_field4[]" placeholder=""></textarea><br/><textarea rows="4" cols="10" class="form-control physical_examination(urine)_field5" name="physical_examination(urine)_field5[]" placeholder=""></textarea><br/>';
var generatedView=$(".generatedView");
generatedView.append(str);
HTML
<div class="generatedView"></div>
Output
A visualization of the textarea html:
https://i.sstatic.net/yLy6J.png
Expected Output
Desired view of the textarea in the DOM: