diff --git a/client/components/open/forms/components/FormSubmissions.vue b/client/components/open/forms/components/FormSubmissions.vue index 3cbf8dc..08b42db 100644 --- a/client/components/open/forms/components/FormSubmissions.vue +++ b/client/components/open/forms/components/FormSubmissions.vue @@ -60,9 +60,9 @@ href="javascript:void(0);" class="text-gray-500" @click="showColumnsModal=true" >Display columns

-

+

Export as CSV

@@ -248,6 +248,15 @@ export default { this.fullyLoaded = false this.tableData = [] this.getSubmissionsData() + }, + downloadAsCsv() { + opnFetch(this.exportUrl, { responseType: "blob" }) + .then( blob => { + var file = window.URL.createObjectURL(blob); + window.location.assign(file); + }).catch((error)=>{ + console.error(error) + }) } } }