Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -75,9 +75,11 @@ def display_parameter_survey():
|
|
| 75 |
<iframe src="{survey_url}" width="100%" height="600px"></iframe>
|
| 76 |
<script>
|
| 77 |
window.addEventListener("message", (event) => {{
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
| 81 |
}});
|
| 82 |
</script>
|
| 83 |
"""
|
|
|
|
| 75 |
<iframe src="{survey_url}" width="100%" height="600px"></iframe>
|
| 76 |
<script>
|
| 77 |
window.addEventListener("message", (event) => {{
|
| 78 |
+
if (event.origin === "https://app.surveystack.io" && event.data.type === "SUBMISSION_SUBMIT_SUCCESS") {{
|
| 79 |
+
const submissionId = event.data.payload.submissionId;
|
| 80 |
+
console.log("Submission ID:", submissionId);
|
| 81 |
+
window.huggingface.variables.mySubmissionData = submissionId;
|
| 82 |
+
}}
|
| 83 |
}});
|
| 84 |
</script>
|
| 85 |
"""
|