Hello all,
I am currently trying to add a button, that when I click it - a list of questions appear (with textareas), every textarea has his own ID and I'm trying to get all of the answers printed into one form.
<h5>QUESTION BULK 1/h5>
<div id="question1">
<h4">#1</h4> <p>Relative name?: <input id="a_relative">
<p>Age: <input id="a_age"> <p>What makes him your relative?: <input id="a_what">
</div>
I'm trying to get a button to make it add that bulk of questions, so the user can add the relevant amount.
e.g:
<button onClick="clickMe()">Add</button>
All of the data from the inputs should be later taken and put into a certain "answer sheet" form.
e.g:
function clickMe() {
var relative = document.getElementById("a_relative").value;
var age = document.getElementById("a_age").value;
var what = document.getElementById("a_what").value;
var generatedForm = " Name: "+relative+"\n\
Relative age: "+age+"\n\
Reason he/she is your relative: "+what+".";
document.getElementById("X").value = clickMe // put everything in a textarea of example,
}