Search...
onSubmissionUpdated( )
Triggered when:
- Submission is updated.
- Submission order status is updated.
- Submission is confirmed.
Syntax
function wixForms_onSubmissionUpdated(event: SubmissionUpdated): void
onSubmissionUpdated Parameters
NAME
TYPE
DESCRIPTION
event
Optional
SubmissionUpdated
Information about the updated submission and metadata for the event.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
An event that triggers when submission is updated
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.3// Add the file if it doesn't exist.45export function wixForms_onSubmissionUpdated(event) {6 const entityId = event.entity._id;7 console.log(`Updated submission with the id: ${entityId}. Event details: `, event)8}910/* Full event object:11{12 "entity": {13 "formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03",14 "namespace": "wix.form_app.form",15 "status": "PENDING",16 "submissions": {17 "first_name": "Patsy",18 "last_name": "McBride"19 },20 "revision": "1",21 "owner": {22 "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"23 },24 "submitter": {25 "applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"26 },27 "seen": false,28 "_id": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d",29 "_createdDate": "2023-12-28T12:55:55.630Z",30 "_updatedDate": "2023-12-29T11:53:55.746Z"31 },32 "metadata": {33 "entityId": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d",34 "eventTime": "2023-12-29T11:53:55.746Z",35 "id": "a92d9e8b-abd7-4903-a954-5a6848f6f4eb",36 "triggeredByAnonymizeRequest": false37 }38}39