Streaming live at 10am (PST)

How to populate input fields at checkout (SOLVED)

Hi there,

I’m currently building an e-commerce site for a client, but at checkout they don’t need the shipping address of their customers since they will only offer pick-up. Since there is no way to disable required shipping yet, I’ve looked around on the forum for a post that describes how to pre-populate form fields with javascript or jQuery (populate based on URL isn’t possible since I can’t create a custom checkout URL) but nothing has worked so far.

I currently have this script in the custom code

<script>
$(document).ready(function() {    
    $("#street1").val("mediaplein"); 
    $("#street2").val("1");
    $("#city").val("Antwerp");
    $("#zip").val("2000");
});
</script>

Eventually, if I get this working I would set the input fields to hidden.

I was also wondering if it’s possible to pre-populate the checkbox of “billing address is the same as shipping address”

any help would be great,
Thanks in advance!

here’s my sharelink:
https://preview.webflow.com/preview/christmas-beta?utm_medium=preview_link&utm_source=dashboard&utm_content=christmas-beta&preview=cec38c3f20472cdf0cb323ce6ce69ce3&mode=preview

UPDATE!
I got it to work (the script i used was correct but somehow it didn’t work when i first tried).

1 Like

Regarding billing same as delivery you can set it up in webflow.
In the payment info section you can set this up

Happy to hear you found the solution! Closing the topic :webflow_heart: