xxxxxxxxxx
function siblingInfo() {
/*Get the number of children from input field*/
var number_of_siblings = document.getElementById("number_of_siblings").value;
/*Generating input fields dynamically in the same form itself*/
for(var i = 0; i < number_of_siblings; i++) {
var sibling_info = document.createElement("input");
sibling_info.type = "text";
sibling_info.name = "sibling_name";
sibling_info.value = "{{ old('sibling_name') ?? $user->siblings->name }}";
document.getElementById('updateForm').appendChild(sibling_info);
}
}