Triggered when:
function wixForms_onSubmissionUpdated(event: SubmissionUpdated): void;
Information about the updated submission and metadata for the event.
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.
export function wixForms_onSubmissionUpdated(event) {
const entityId = event.entity._id;
console.log(`Updated submission with the id: ${entityId}. Event details: `, event)
}
/* Full event object:
{
"entity": {
"formId": "21bcb6c7-02b3-4ed1-b6db-7856094fac03",
"namespace": "wix.form_app.form",
"status": "PENDING",
"submissions": {
"first_name": "Patsy",
"last_name": "McBride"
},
"revision": "1",
"owner": {
"applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"
},
"submitter": {
"applicationId": "151e476a-715e-ec33-db9a-a7ff4d51f70a"
},
"seen": false,
"_id": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d",
"_createdDate": "2023-12-28T12:55:55.630Z",
"_updatedDate": "2023-12-29T11:53:55.746Z"
},
"metadata": {
"entityId": "f8281b62-1b2f-45bf-ba7d-f041d7653d2d",
"eventTime": "2023-12-29T11:53:55.746Z",
"id": "a92d9e8b-abd7-4903-a954-5a6848f6f4eb",
"triggeredByAnonymizeRequest": false
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.