JSFiddle - React, Tailwind, and code Playground

HTML

<form action="site.php" method="post">
			<div class="actions">
				<table id="table_actions">
					<tr>
						<th>Beschriftung</th><th>Name</th><th>Objekt</th><th>Pflichtfeld</th>
					</tr>
				</table>
				<div id="click" onclick="addrow()">+</div>
				<input type="submit" value="Erstellen!" class="action-btn">
			</div>
		</form>
<script>
    
    
</script>

JavaScript

function addrow(){
	var table = document.getElementById('table_actions')
	var row   = table.insertRow(-1);
	addcell(table, row);
}


function addcell(table, row){

	// ------Config file -----

	var object = new Array();
	object[0] = "Text";
	object[1] = "Password";
	object[2] = "Checkbox";
	object[3] = "Radio";
	object[4] = "Label";
	object[5] = "Textarea";

	// --------End Config file -----

	for (var i = 0; i < 4; i++) {
		alert(i);
		var cell = row.insertCell(i);
		if (i == 0){
			var input = document.createElement('input');
			input.setAttribute('type', 'text');
			input.setAttribute('name', 'beschriftung');
			cell.appendChild(input);
		} else if (i == 1) {
			var input = document.createElement('input');
			input.setAttribute('type', 'text');
			input.setAttribute('name', 'name');
			cell.appendChild(input);
		} else if (i == 2) {
			var dropdown = document.createElement('select');
			for (var i = 0; i < object.length; i++) {
				var option  = document.createElement('option');
				option.text = object[i];
				option.value   = object[i];
				dropdown.options.add(option);
				cell.appendChild(dropdown);
			}
			continue;
		} else if (i == 3) {
			var checkbox = document.createElement('input');
			checkbox.setAttribute('type', 'checkbox');
			checkbox.setAttribute('name', 'pflicht');
			cell.appendChild(checkbox);
		} else {
			cell.setAttribute('name', i);
		} 
	}
}