Hello Tumulter,
I've been trying for a few days to create a Tumult document that will greet visitors coming into the house with their names and other details on our tablet at reception.
The document should be on our web space and therefore accessible to everyone. So that all colleagues can easily enter the details from their workstation and the website is always loaded and visible on the tablet via the presentation app. If there are no appointments, the document should play an animation.
The document will later have several pages that serve as templates when one visitor arrives, two visitors arrive, five visitors arrive, etc.
But I can't get the entries to be saved. They always disappear when the document is reloaded. And when the document is accessed from another browser, the initial entries are still there.
Is this even possible the way I imagine it to be?
The script in the :
<script>
document.addEventListener('DOMContentLoaded', function() {
var checkExist = setInterval(function() {
if (document.getElementById('01-time') && document.getElementById('01-name') && document.getElementById('01-company')) {
clearInterval(checkExist);
attachEventListeners();
}
}, 100); // Überprüfe alle 100 Millisekunden
function attachEventListeners() {
document.getElementById('01-time').addEventListener('blur', function() {
console.log("01-time verlassen");
localStorage.setItem('01-time', this.value);
});
document.getElementById('01-name').addEventListener('blur', function() {
console.log("01-name verlassen");
localStorage.setItem('01-name', this.value);
});
document.getElementById('01-company').addEventListener('blur', function() {
console.log("01-company verlassen");
localStorage.setItem('01-company', this.value);
});
}
});
</script>
The field details:
This is not the actual document, just one with the possible functions:
Besucher.zip (22,9 KB)
There is no error in the console and I get the event messages on leaving the fields. The values of the fields in Local Storage are undefined.
I have no other actions or scripts that are executed when any scenes are started. The ones that are still in the library are not linked.
Anyway, I'm on the verge of going crazy.
So if anyone has any tips or help, that would be great!
Kind regards
Marco