Contact form (html)

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.

Hi @Alena_Rozhdestvenskaya

You would need a custom form for this, except if you know how many input field you need, then it would be possible to simply hide them and show them using animation and a button, but this would probably not be a perfect solution either, as the inputs would be hidden again when the button is pressed again.