Marks form submissions as "seen".
This function marks the submissions as if they were seen by the site owner. Only site collaborators with the Manage Submission permissions can mark submissions.
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function bulkMarkSubmissionsAsSeen(
ids: Array<string>,
formId: string,
): Promise<void>;
IDs of submissions to mark as seen.
ID of the form which the submissions belong to.
import { submissions } from "wix-forms.v2";
/*
Sample ids value: ["f8281b62-1b2f-45bf-ba7d-f041d7653d2d", "abb9b5c9-a881-467c-9c34-b9bea43ca5f0"]
Sample formID value: "21bcb6c7-02b3-4ed1-b6db-7856094fac03"
*/
export async function myBulkMarkSubmissionsFunction(ids, formId) {
try {
const markedSubmissions = await submissions.bulkMarkSubmissionsAsSeen(
ids,
formId,
);
console.log("Success! Marked submissions:", markedSubmissions);
return markedSubmissions;
} catch (error) {
console.error(error);
// Handle the error
}
}
/* Promise resolves to void */
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.