I have a input (not input text box) where user types text to search on a collection. The result is filled a repeater as a droplist (dropdown) effect to user chooses.
The issue is when the browser overlapping that repeater with the autocomplete listdrop.
The thml input has the attribute autocomplete=“off” for .
Wix has a lack between the HTML specifications and editor/api(corvid).
The workaround is using the input Text Box (browser does not create autocomplete for text boxes) but now the problem is keypressing “Enter”.
The HTML specification has option to use “return false” on the keypress event avoiding the keypressed key. Again, I tried “return false” on $w('textbox1).keypress((event) => {}) and did not work.
Those option are not dangerous to break the DOM and are not a way to get direct DOM access.
How can I set the autocomplete=off for input field or block the “enter” on text box?
I’m facing the same problem. Did you eventually manage to find a solution?
This issue is really on the browser side. For questions that are not related to code you can contact Wix Customer Care . You’ll get better help for your problem there.
Dear Yisrael,
I’m actually not entirely agree with your statement.
First, both me and mvveiga, wish to create some sort of autocomplete using Corvid, and there’s an issue preventing us from doing so succesfully.
So I wouldn’t say this post is not related to code.
Not only that, this forum have many discussions about creating an autocomplete using Corvid, this seems to be a common need, and the fact the browser cover the autocomplete list with it’s own, could be a significant problem for many. Some as you can see already asked about it, but ended up marked as spam https://www.wix.com/corvid/forum/community-discussion/default-textbox-autocomplete-off
And last, this is not a full browser decision, as setting the ‘autocomplete’ to off on the input field, will solve this problem:
https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
I would imagine, adding a boolean autocomplete field in the TextInput element, could have resolved this issue.
So maybe you could classify that as a feature request.
But who knows, maybe someone else managed to find a creative way to overcome that in the meantime
Either way, thank you very much!
I appreciate you taking the time to respond
I’ve run into the same issue myself, and there currently is no way to control this via Corvid. You might try the Wishlist Page and request as a new feature.
Believe me, these requests are not considered spam. The post that was marked as spam was most likely spammed (with goodness knows what kind of garbage comment) so the comment was deleted. The post was closed as it was an old post. It’s always better not to bump old posts, but rather create new posts for new questions.
Wow…I just ran into this from the strangest place. We just launched our site (yerbabuenanursery.com), and customers are already sending in lots of feedback. One customer is REALLY REALLY VERY ANGRY AT ME for populating form fields with entries from her Contacts List. (yes…I know). She KNOWS that this is my nefarious code, because no other nursery website fills things in!
I’ve tried to explain to her that it’s her browser that’s doing it, but she won’t believe me. I even pasted in the html from other nursery sites that name their text input fields to something Safari isn’t going to try to fill in (things like name=fltr).
I deliberately chose good labels, placeholders and names because…well…you should! And because ARIA will undoubtedly be able to tell a blind person much more useful information when the placeholder text and Aria label is “Botanic Name” than if it’s “asdf”
While inspecting other sites and pasting their input field code into my response to this customer, I came across one site that manually set autocomplete=“off” on the text input. So I set out to see if I could use this attribute in my Wix text inputs, and it seems like I can’t.
Not that it is insanely critical, but it would be nice to have. I’m just glad I got the chance to research this particular aspect of form autofill. I never paid a lot of attention to how it worked under the hood. I guess Wix’s “problem” is that it helps me create input fields that are REALLY REALLY USEFUL. There are worse problems to have.
I have a solution that worked for me when I was facing this same problem trying to do this. The workaround I used is by binding a mouseover event handler on the input element and adding the autocomplete attribute. As of oct 31st 2021 this works on chrome
What you need first is the ID of the Wix input element you need to set this on. That you can get from the Right click > Inspect feature in the browser. It might something like input_comp-ktapjxyf
-
Go to your Wix Dashboard > Settings > Advanced > Custom Code
-
Click ‘Add Code’ under the ‘Body - End’ section
-
Select ‘Essential’ as type of Code Type
-
Under “Add code to page” make sure you select the correct page or all pages
-
Add this snippet in the box under " Paste the code snippet here:"
<script type="text/javascript">
(function() {
var selector = '#INPUT_ELEMENT_ID';
document.addEventListener('mouseover', function(e) {
var el = e.target;
if (!el.matches(selector)) {
return;
}
el.setAttribute("autocomplete", "new-password");
});
})();
</script>
NOTE : This is a crude workaround, I haven’t tested it in depth but it might help for now
This code works at as of June, 2023. Add it to ‘body end’ as custom code. It will disable autocomplete for all the input elements on your wix page.
If you want to disable autocomplete for a specific input element, you will need to find its input id as suggested by Avinash .
Hi, did you do this through embedded code or how did you include this custom script? I am using EditorX