I've created a component to pre populate checkout Shipping Address form after document is loaded.
I've enter the city,postcode and country on the front end and first name and last name within quote.shippingAddress()
e.g
quote.shippingAddress().firstname = 'John';
quote.shippingAddress().lastname = 'Doe';
But it seen that it ins't populating the form itself but it's populating the object fine. look screen shoot attached the form.
The object :
As you can see when I refresh the page the object get populated but the form on first name and last name is empty.
Does anyone know how can I achieve this?
Thanks.
document.getElementsByName(field)[0].value = val; $("input[name~='" + field + "']").trigger('change');