JSFiddle - React, Tailwind, and code Playground
HTML
<form id="idOfTheForm" action="?" method="post">
<table border="1">
<tr>
<th class="image">Image</th>
</tr>
</table>
</form>
JavaScript
function insertQuestion(form) {
var imageField = $('<input />')
.attr({
type: 'file',
name: 'imageFile',
id: 'imageFile'
});
$(form).find('table').append($('<tr />').append(imageField));
}
insertQuestion($('#idOfTheForm'));