I am looking to pre-populate a website visitors auto-fill information on page load, instead of making them click the box or start typing to use the auto-fill info. I have the code to pre-fill input fields, although I need that to be a visitors information, not pre-entered information.
<script>
$( document ).ready(function() {
// after the page elements are all loaded, then run the script
// Set the input field with unique ID #email to a value
$("#email").val('someone@test.com');
// Set the input field with unique ID #name
$("#name").val('John Doe');
});
Do you know if there is a way to use that same script, but pre-populate that information with the browsers autofill, without a user clicking, or begin typing in the input box?
Here is an example of the type of autofill information I’m talking about:
If they have filled in the same form before though, you could set a cookie so you can read the values the next time and insert the values into the same fields.
Also, feel free to contact me for further code help and/or customization of third-party plugins