JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div>
<h2>ваши инпуты</h2>
<input class="needInputs" id="iq1" type = "checkbox" value = "Значение1" name="needInputs">Значение1
<input class="needInputs" id="iq2" type = "checkbox" value = "Значение2" name="needInputs">Значение2
<input class="needInputs" id="iq3" type = "checkbox" value = "Значение3" name="needInputs">Значение3
</div>
<input id="btnSubmit" type = "button" value = "Отправить">
<textarea id="needTextBlock"type = "text" col="20" row="20"></textarea>
<input id="" type = "button" value = "Отправить на почту">
</body>
</html>
CSS
#needTextBlock {
height: 100px;
}
JavaScript
//получаем группу нужных инпутов
const inputGroup = document.getElementsByClassName('needInputs');
//получаем кнопку
const btnSend = document.getElementById('btnSubmit');
const textArea = document.getElementById('needTextBlock');
//вешаем обработчик
btnSend.addEventListener('click', e => {
e.preventDefault();
//стираем все что было до
textArea.value = '';
//перебираем инпуты. и те которые чекнуты вставляем в наш большой
for (let i = 0; i < inputGroup.length; i++)
{
if (inputGroup[i].checked) {
textArea.value += `\n${inputGroup[i].value}`;
}
}
});