Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Taking your approach on designing things actually makes it fun, more natural, and overall easier.

— Dominik, Developer

Form:Success Tag

This is how you check if a form was successful outside of a form:create tag.

Example

{{ if {form:success in="contact"} }}
<p>Thanks for filling out the survey! Sorry it was so long.</p>
{{ /if }}
Hot Tip!

form:success is a Tag, not a variable. Be sure to wrap it with single braces when inside a condition.

{{-- Using Fluent Tags --}}
@if (Statamic::tag('form:success')->in('contact')->fetch())
<p>Thanks for filling out the survey! Sorry it was so long.</p>
@endif
 
{{-- Using Antlers Blade Components --}}
<s:form:success
in="contact"
>
<p>Thanks for filling out the survey! Sorry it was so long.</p>
</s:form:success>

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.

Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →