Skip to content
Grav 2.0 is officially stable. Read the announcement →
Forms & Blueprints

Thank you page after form submission

Solved by Max View solution

Started by Hugo Oliveira 8 years ago · 4 replies · 888 views
8 years ago

Hi everyone,

I need help. I have a form that after submission displays the thank you page, just as is described in the Learn site.
I want the page to display the form contents that were just submitted (and are correctly sent via email). However, that does not happen and I can't figure out what might be causing this.

Any help is welcomed. Thank you in advance.

current contents of "formdata.html.twig"

TWIG
{% extends 'partials/base.html.twig' %}

{% if form is null %}
    {% set form = grav.session.getFlashObject('form') %}
{% endif  %}

{% block content %}
    <div class="container">
        <div class="col-md-6 col-12 formdata-thankyou">
            {{ content|raw }}

            {% if form %}
                {% include 'partials/form-messages.html.twig' %}

                <p>{{ 'PLUGIN_FORM.DATA_SUMMARY'|t }}</p>

                {% include "forms/data.html.twig" %}

            {% else %}
                <div class="notices warning yellow"><p>{{ 'PLUGIN_FORM.NO_FORM_DATA'|t }}</p></div>
            {% endif %}
        </div>
    </div>
{% endblock %}
10 months ago

I know this is very old, but I am facing the same issue… I can see the Thank you page, it says “Here is the summary of what you wrote to us:” and that’s it. The summary of what was actually submitted is not displayed.

Any help, would be greatly appreciated.

10 months ago

@mrmmm, I cannot reproduce the issue:
image|690x210

Your question provides very little information to decipher what might be going on. Please provide more information, like the theme you are using, form definition, folder structure, etc.

I used the example form together with the description of the display action to get above thank you page.

10 months ago

An example with Editorial theme. You can see the demo content in theme repository.

Email sent  Grav Editorial|229x500

10 months ago Solution

I’ve been banging my head against this for a few days and just realized that I had “-reset: true” right before “-display: thankyou” in my form.md!

Thank you for taking the time to respond and make me go through the code for the 50th time!

👍 2

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1501 5 months ago
Forms & Blueprints · by Hugo Oliveira, 6 months ago
0 251 6 months ago
Forms & Blueprints · by Flachy Joe, 7 months ago
9 356 7 months ago
Forms & Blueprints · by Augustus, 8 months ago
7 347 8 months ago
Forms & Blueprints · by Julien, 8 months ago
10 382 8 months ago