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
The submission ID.
The form ID this submission belongs to.
The Form this submission belongs to.
The submission status ID.
The submission status handle.
The user ID associated with the submission, when collected.
The Craft user associated with the submission, when collected.
The site ID this submission was made on.
The saved render snapshot used for field settings and submission output.
The submitter IP address, when collected.
Whether the submission is incomplete.
Whether the submission has been marked as spam.
The spam reason, when the submission is marked as spam.
Whether validation should only run for the current page.
The date the submission was created.
Methods
Returns the submission’s Form.
Returns the form pages for this submission.
Returns the form rows for this submission.
Returns the form fields for this submission.
Returns a field by handle.
Sets a field value on the submission.
Returns the field's normalised PHP value for the supplied field key. Text and Email return strings; Name returns NameFieldValue; Phone returns PhoneFieldValue. Dates and selected options return their field value objects, and relation fields return Craft queries. This method takes no output-format argument. Use getFieldValueAsString() for display text or getFieldValueAsData() for JSON-safe data.
Returns the field value as a string.
Returns a field value that can be encoded as JSON. Simple fields return a single value, such as a string or boolean; fields such as Address return named parts.
Returns the field value prepared for singular reference contexts.
Returns the field value prepared for reference-block rendering.
Returns the field value prepared for export.
Returns the field's readable report-cell value. For example, submission.getFieldValueForReport('name') returns a combined name, while submission.getFieldValueForReport('name.firstName') returns its first name. Pass false as the second argument to use stored option values instead of labels. This method is used by report tables and report exports; getFieldValueForExport() retains structured field export data.
Returns the field value prepared for summary views.
Returns the field value prepared for an integration field.
Returns all submitted field values as strings.
Returns a handle-keyed map of JSON-safe field data. Individual values may be scalars, null or structured arrays.
Returns all submitted field values prepared for export.
Returns all submitted field values prepared for summary views.
Returns element relations found in the submission.
Returns payment records associated with the submission.
Returns subscription records associated with the submission.