Hello,
how can I add feld (html) to a contact form? So that the data entered by the user is transmitted by email along with the rest of the data in the form?
Here is a sample code:
<div class="contact-form">
<div class="contact-row">
<input type="text" placeholder="Имя">
<span class="add-button" onclick="addRow()">➕</span>
</div>
</div>
<script>
function addRow() {
var contactForm = document.querySelector('.contact-form');
var newRow = document.createElement('div');
newRow.className = 'contact-row';
newRow.innerHTML = '<input type="text" placeholder="Другое поле"><span class="add-button" onclick="addRow()">➕</span>';
contactForm.appendChild(newRow);
}
</script>
Thanks in advance.