Forum Discussion
Text entry fields show previous answers, despite clearing them via triggers
- 2 months ago
Hi GaryMiller-f990 I believe you would have to be able to add the autocomplete="off" attribute and value to the input field in order to be able to suppress this browser feature.
Storyline doesn't provide an interface for doing this, but you can add the attributes with JavaScript in the following way. Try adding this to the timeline starts trigger (execute JS) on the slide with the input field.
const textInputs = document.querySelectorAll('input[type="text"]'); textInputs.forEach(input => { input.setAttribute('autocomplete', 'off'); });
NB: Text input fields change to textarea fields if you make them multiline. You'd need to do this for textarea fields:
const textInputs = document.querySelectorAll('textarea'); textInputs.forEach(input => { input.setAttribute('autocomplete', 'off'); });
Hi GaryMiller-f990 I believe you would have to be able to add the autocomplete="off" attribute and value to the input field in order to be able to suppress this browser feature.
Storyline doesn't provide an interface for doing this, but you can add the attributes with JavaScript in the following way. Try adding this to the timeline starts trigger (execute JS) on the slide with the input field.
const textInputs = document.querySelectorAll('input[type="text"]');
textInputs.forEach(input => {
input.setAttribute('autocomplete', 'off');
});
NB: Text input fields change to textarea fields if you make them multiline. You'd need to do this for textarea fields:
const textInputs = document.querySelectorAll('textarea');
textInputs.forEach(input => {
input.setAttribute('autocomplete', 'off');
});
- GaryMiller-f9902 months agoCommunity Member
Wow! Thanks so much - this appeared to solve the problem where other suggestions - and things I tried - were ineffective! And the JavaScript required no tweaking. Thanks so much!