Simple form on every product page

I need help with very easy thing. I created form as popup (via Bootstrap modal) and now i need to get it working on every product page. So i inserted code to product template (product.html.twig) and all looks fine. But while studying sending form in doc i can’t find how to make it alive. I only found how to create simple form via manually editing markdown header, but no way how to handle form via page templates. Please, can you help me what’s the best way to do it in Grav?

My form looks like:

<div class="modal-body">
                        <form>
                            <div class="form-group">
                                <label for="customer-name" class="control-label">Name:</label>
                                <input type="text" class="form-control" id="customer-name">
                                <label for="customer-phone" class="control-label">Phone:</label>
                                <input type="text" class="form-control" id="customer-phone">
                                <label for="customer-email" class="control-label">Email:</label>
                                 <input type="text" class="form-control" id="customer-email">
                            </div>
                            <div class="form-group">
                                <label for="message-text" class="control-label">Message:</label>
                                <textarea class="form-control" id="customer-message">Please, send me {{ header.product.name}}.</textarea>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        <button type="button" class="btn btn-primary" style="background-color: black">Send</button>
                    </div>

Based on this: https://learn.getgrav.org/forms/forms#displaying-forms-from-twig i created simple file product-form.html.twig with. But it renders just as text.

forms:
    form:
        name: contact
        fields:
            name: customer-name
            name: customer-email
            name: customer-phone
            name: customer-message
        buttons:
            type: submit
            value: Submit
        process:
        -
            email:
                subject: '[subject] {{ form.value.name|e }}'
                body: 'content' {# {% include ''forms/data.html.twig'' %} #}
        -
            save:
                fileprefix: contact- 
                dateformat: Ymd-His-u
                extension: txt
                body: 'test' {#{% include ''forms/data.txt.twig'' %}#}
        -
            message: 'Thanks'

So i ended with simple PHP form submit, but Twig can’t handle it… :frowning:

Any tips how to send own form from Grav?

Meantime i found part of the solution: i created new page, not published, in header all my form id MD and call it in twig.html template with own form. Works now :slight_smile: