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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Thank you page after form submission

Solved by Max View solution

Started by Hugo Oliveira 8 years ago · 4 replies · 724 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 %}
9 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.

9 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.

9 months ago

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

Email sent  Grav Editorial|229x500

9 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 1136 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 134 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 129 7 months ago