auto fill sign up data in custom form Magento 2 frontend

633 Views Asked by At

Someone please suggest the solution?

I want prefilled data in my custom form that user already entered in the signup form.

Thanks, Rashi

1

There are 1 best solutions below

0
On BEST ANSWER

You could use the customer's local storage. Long story, thus you can check this blog for more information.

When we've got the customerData from the Magento_Customer/js/customer-data.js source, you can fill the form with it. $('#custom-form-username').val(customerData.get('name')); . I hope this will give you some directions.