I can see that when I inspect the page, there is this CSS code that seems to run when autofill-selected, it sets the background-color to RGB(232, 240, 254). Is there a way to modify this?
I tried the following, but it doesn’t seem to over-write
I basically don’t want the input background color to change when auto-filled. So I want it to match the backgroundColor which is #1A2D4E or simply just not change the color at all.
Hi Velo-Ninja.
Autofill as in, when a user authenticate and log in for the first time, the browser asks if a user want to save id/pw. Upon saving them, next time a user visits the website, the id/pw field is “autofilled” with saved data.
I have tried all 3 ones and none of them does the job.
I do not think the Opacity has to do with anything since the color does not even change.
Autofill as in, when a user authenticate and log in for the first time, the browser asks if a user want to save id/pw. Upon saving them, next time a user visits the website, the id/pw field is “autofilled” with saved data
Where did you get this function from ?
Do you have a custom code for this functionality?
Did you code it on your own?
Or do you use something predefined like an APP ?
Do you have an OWN DATABASE for that functionality?
Show a pic and try to describe a little bit more.
You do not provide enough informations.
I was trying to build one that can “change the autofill input color”
Did you code it on your own?
I did not code anything. It seems like it’s a default function that Wix has. Nothing shows in dev mode as you can see. As you can see from the picture, the password input field has a whitish background.
Ok, when using predefined stuff, in most cases you don’t have all the options to work with (to be able to use).
The autofill you are talking about does not really come from Wix.
It is generated out from your own Browser. A browser-function, which works on PASSWORD-FIELDS (on my opinion).
So now your goal is to change color, when the Password-Field is auto-prefilled?
What is the ID of your password-element?
So you want to check if the password-field is prefilled → onLoad of the page?
What if it is? → changing the backgroundcolor of the INPUT-FIELD ?
$w.onReady(function(){
if($w("#pwInputFieldIDhere").value) {
console.log("PW-Field has data inside --> green-color");
$w("#pwInputFieldIDhere").style.backgroundColor="green";
}
else {
console.log("PW-Field has data inside --> red-color");
$w("#pwInputFieldIDhere").style.backgroundColor="red";
}
});
But i don’t think this will work.
What would maybe work is a kind of cyclic-checking-function → using → INTERVAL-FUNCTION <— to check periodic → for example → every 3 sec, if the INPUT-FIELD already has a → VALUE.
Generate your Interval-Function, to check if your PW-FIELD already has a value or not. If so → stop Interval-Check.
Last option would be the onChange-Event of the PW-INPUT-FIELD itself.
But also here not sure if this event ever gets triggered.
Test it out.
I would have to rebuild all your setup first to test it (sorry, i don’t have the time for it).