For example:
When I input value in the html formfield1 then formfield2 will be created, when I input value in the formfield2 then formfield3 should be created and so on, but in the below code the form fields didn't work in proper sequence and my typed input values also not show in formfields.
Code:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="fieldvalue">
<input type="text" oninput=Childfield() />
</div>
<script type="text/javascript">
const Childfield = () => {
let rvalue= '<input type="text" id="fieldvalue" name="" oninput=Childfield() />';
document.getElementById('fieldvalue').innerHTML += rvalue;
}
</script>
</body>
</html>