CODE

Web Form Custom Confirmation Page

Liquid snippet to place on your form submission page, to display customisable confirmation message and submission data formatting.

v1.0.0
  1. Place the below code on your form submission page, replacing text with your own:

    <!-- Treehouse CODE v1.0.0 -->
    {% if this.formSubmissionData.error > 0 %}
    <h2>Form validation & submission failed!</h2>
        {% for errorMessage in this.formSubmissionData.errorMessages %}
            <p>{{errorMessage}}</p>
            <p>Please go back and make sure all mandatory fields have been completed.</p>
        {% endfor %}
    {% else %}
    <h2>Hey {{this.formSubmissionData.fields.system.firstname.value}}, thanks so much for submitting your enquiry!</h2>
    <br>
    <p>We have received it and will be in touch with you soon.</p>
    <p>Thank you from [Client Name].</p>
    {% endif %}

Comments or questions? Head over to the Treepl CMS forum to discuss with the community.