Submissions

Similar to Craft Entries, every time a user submits a form, we refer to those as submissions. Currently, submissions can be viewed and edited in the control panel, and displayed on the front end in templates as a list and individually.

In the Control Panel

The list of submissions in the control panel appears very similar to how regular Craft Entries are displayed. You can filter the view by form (or show across all forms), search into submissions, adjust which field columns are shown, and click into any of the submissions to edit them.

Additionally, Freeform includes a chart that gives you a quick visual of how many form submissions your site is receiving.

Submissions Edit Submissions

Exporting Submissions

Freeform includes 3 options for exporting (2 of which are Pro only). Please refer to the Exporting documentation for more information.

In Front End Templates

One common use-case might be displaying the contents of the form submission to the user that submitted it right after they have successfully submitted the form, allowing them to review what they submitted. Of course, be aware that there are security implications here if the submissions contain sensitive content.

If the information is not sensitive, and meant to be public - like comments, you can also display submissions in a paginated (or not) list.

For more information about this, please visit the freeform.submissions template function documentation.

Editing Submissions Pro

Freeform allows you to edit submissions via the front end templates as well. Currently, this feature has no user/author check, and requires you use/provide the submission.token to work (as opposed to the ID). A future version will likely include ability to check on authors, etc. The editing uses the same freeform.form function, but knows you're in edit mode when you feed the submissionToken parameter a valid value.

WARNING

There are currently some limitations with this feature. Please note that:

  • There are no controls for suppressing/changing email notification options in edit mode (e.g. editing a form with submitter and admin email notifications will trigger those again).
  • Not all types of forms can be intuitively edited (e.g. Payment forms, some complex ones, etc).
  • Editing Payment forms will NOT update payment details, but instead will make a new submission/charge.
  • Editing forms with Element Connections will NOT update the corresponding element, but just create a new one instead (so currently no editing of user profile data, etc).

When linking to the form edit, you might use something like this inside the freeform.submissions function:

{% if currentUser and currentUser.admin %}
    <a href="{{ siteUrl }}page/{{ form.handle }}/edit/{{ submission.token }}">
        {{ "Edit"|t("freeform") }}
    </a>
{% endif %}
1
2
3
4
5

Then in your template that includes the freeform.form, be sure that the submissionToken parameter is included and checking the URL for a value:

 



 


{% set submissionToken = craft.app.request.segment(4) %}

{% set form = craft.freeform.form('myForm', {
    returnUrl: "{{ siteUrl }}page/{{ form.handle }}/submission/{{ submission.id }}/success",
    submissionToken: submissionToken|default(null),
}) %}
1
2
3
4
5
6

You can also check out the example in the demo templates if you wish to see it in action.

Last Updated: 6/11/2019, 8:21:07 AM