Streaming live at 10am (PST)

Pre-Populate Users Auto-Fill Information


#1

Hello everyone,

I had a question similar to: https://forum.webflow.com/t/how-to-pre-fill-form-input-fields-at-page-load/16868/5

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');
    
    });


#2

See this https://forum.webflow.com/t/auto-fill-form-values-based-on-url-querystring/44179?u=samliew


#3

Thanks @samliew,

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:

Thanks for all your help!


#4

No. Each browser has their own implementation of autofill, and there is no way to access that information for security reasons.


#5

I thought that may have been the case. Thankyou again for all your help!


#6

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


#7

Ok, that could still be helpful. I'll look into that!