You are viewing beta documentation for Formie 4.x.
Reference

Submission

A Submission object represents data that has been saved through a form. That can be a completed submission, a partially saved submission, or a submission that has been marked as spam.

Properties

PropertyDescription
idThe submission ID.
formIdThe form ID this submission belongs to.
formThe Form this submission belongs to.
statusIdThe submission status ID.
statusThe submission status handle.
userIdThe user ID associated with the submission, when collected.
userThe Craft user associated with the submission, when collected.
siteIdThe site ID this submission was made on.
snapshotThe saved render snapshot used for field settings and submission output.
ipAddressThe submitter IP address, when collected.
isIncompleteWhether the submission is incomplete.
isSpamWhether the submission has been marked as spam.
spamReasonThe spam reason, when the submission is marked as spam.
validateCurrentPageOnlyWhether validation should only run for the current page.
dateCreatedThe date the submission was created.

Methods

MethodDescription
getForm()Returns the submission’s Form.
getPages()Returns the form pages for this submission.
getRows()Returns the form rows for this submission.
getFields()Returns the form fields for this submission.
getFieldByHandle()Returns a field by handle.
setFieldValue()Sets a field value on the submission.
getFieldValue()Returns the normal field value for the supplied field key.
getFieldValueAsString()Returns the field value as a string.
getFieldValueAsArray()Returns the field value as an array.
getFieldValueForReference()Returns the field value prepared for singular reference contexts.
getFieldValueForReferenceBlock()Returns the field value prepared for reference-block rendering.
getFieldValueForExport()Returns the field value prepared for export.
getFieldValueForSummary()Returns the field value prepared for summary views.
getFieldValueForIntegration()Returns the field value prepared for an integration field.
getValuesAsString()Returns all submitted field values as strings.
getValuesAsArray()Returns all submitted field values as arrays.
getValuesForExport()Returns all submitted field values prepared for export.
getValuesForSummary()Returns all submitted field values prepared for summary views.
getRelations()Returns element relations found in the submission.
getPayments()Returns payment records associated with the submission.
getSubscriptions()Returns subscription records associated with the submission.

getFieldValueForEmail() and getFieldValueForVariable() still exist as deprecated compatibility aliases. New code should use getFieldValueForReferenceBlock() and getFieldValueForReference().