Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Bought Jack McDade's course on design. Going through it now...and it is SO well done!

— Justin Jackson, Transistor.fm

Form:Submission Tag

If you want to show the user the data they submitted — whether as a confirmation or to pre-populate or personalize some content — this is the easiest way to do it.

Example

Here we'll output a small thank-you note once there's a successful submission, otherwise show the form itself.

The {{ name }} and {{ rating }} variables correspond to input fields of the same name.

{{ form:set is="feedback" }}
{{ if {form:success} }}
 
{{ form:submission }}
Thanks for your feedback, {{ name }}.
We appreciate the {{ rating }} star rating you gave us.
{{ /form:submission }}
 
{{ else }}
 
{{ form:create }} ... {{ /form:create }}
 
{{ /if }}
{{ /form:set }}

Parameters

handle|is|in|form|formset

string

Specify the name of the form. Only required if you do not use the form:set tag, or don't have a form defined in the current context.

Variables

Variable Type Description

submission data

array

All the fields that were entered in the submission are available.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →
Hello there! Are you looking for the Statamic v2 documentation?